commit:     bd447ffec18ed3e769a062387ce969b738f73f10
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  7 22:18:47 2016 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Nov  7 22:18:47 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd447ffe

dev-python/editorconfig-core-py: New package, python implementation of 
EditorConfig

Package-Manager: portage-2.3.2

 dev-python/editorconfig-core-py/Manifest           |  2 +
 .../editorconfig-core-py-0.12.0.ebuild             | 53 ++++++++++++++++++++++
 .../files/editorconfig-core-py-0.12.0-no-cli.patch | 16 +++++++
 dev-python/editorconfig-core-py/metadata.xml       | 19 ++++++++
 4 files changed, 90 insertions(+)

diff --git a/dev-python/editorconfig-core-py/Manifest 
b/dev-python/editorconfig-core-py/Manifest
new file mode 100644
index 00000000..3dc70b8
--- /dev/null
+++ b/dev-python/editorconfig-core-py/Manifest
@@ -0,0 +1,2 @@
+DIST editorconfig-core-py-0.12.0.tar.gz 24801 SHA256 
0b8e2468305b5795c2f887f936ffc461143567792eed5c81985cbc35b13a7bc0 SHA512 
29c5f58bd7293052e4b1fbfbadcf4a148eb939558494d599bafd46151a4fb5af9cd07dcef477db9a709a0ea63dec0dd7e9d4071779f8ca6e3bd137268cc22f72
 WHIRLPOOL 
40927f76b3395725ef82a60dcf7045948bc41c3bb6c9e671852e3351633675d24cb3becb0e3176e49d8e385d129780210a7b440f5f75012cef9d531f039006e6
+DIST editorconfig-core-test-abb579e00f2deeede91cb485e53512efab9c6474.tar.gz 
7900 SHA256 0c091f6e707f42ddf1069997179da7f46b940b9a17e70ee236208a04783fad88 
SHA512 
ae5424b4926d6cb127cb3da473400ced4f7ccf224f7baa8bc5bde0317cc045bb7b99738a56efe5fd0e5a0fbe39b997b9fb1739d24713e7f83b58e987c5e56a32
 WHIRLPOOL 
31e29d29ed6e4abf493ef2eed960250baebf1c7400830e924e12c1a90559b6ab8717ce40a6d07064e1a619bdac9544863fca16506d228e7ac7735ea3ba4e7966

diff --git a/dev-python/editorconfig-core-py/editorconfig-core-py-0.12.0.ebuild 
b/dev-python/editorconfig-core-py/editorconfig-core-py-0.12.0.ebuild
new file mode 100644
index 00000000..be727fd
--- /dev/null
+++ b/dev-python/editorconfig-core-py/editorconfig-core-py-0.12.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+TESTVER="abb579e00f2deeede91cb485e53512efab9c6474"
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
+inherit distutils-r1
+
+DESCRIPTION="Clone of EditorConfig core written in Python"
+HOMEPAGE="http://editorconfig.org/";
+SRC_URI="https://github.com/${PN%-core-py}/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz
+       test? (
+               
https://github.com/${PN%-core-py}/${PN%-core-py}-core-test/archive/${TESTVER}.tar.gz
 -> ${PN%-core-py}-core-test-${TESTVER}.tar.gz
+       )"
+
+LICENSE="PYTHON BSD-4"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test cli"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+       test? (
+               >dev-util/cmake-3.0
+       )
+       !<app-vim/editorconfig-vim-0.3.3-r1"
+
+src_prepare() {
+       if use test; then
+               mv "${WORKDIR}"/${PN%-core-py}-core-test-${TESTVER}/* 
"${S}"/tests || die
+       fi
+
+       use cli || eapply "${FILESDIR}"/${PN}-0.12.0-no-cli.patch
+
+       default
+       distutils-r1_src_prepare
+}
+
+python_install() {
+       distutils-r1_python_install
+       #use cli || rm -f "${D}/${EPREFIX}"/usr/bin
+}
+
+src_test() {
+       __src_test_run_python_impl() {
+               cmake -DPYTHON_EXECUTABLE="${PYTHON}" . || die "tests failed to 
build with ${EPYTHON}"
+               ctest . || die "tests failed with ${EPYTHON}"
+       }
+       python_foreach_impl __src_test_run_python_impl
+       unset __src_test_run_python_impl
+}

diff --git 
a/dev-python/editorconfig-core-py/files/editorconfig-core-py-0.12.0-no-cli.patch
 
b/dev-python/editorconfig-core-py/files/editorconfig-core-py-0.12.0-no-cli.patch
new file mode 100644
index 00000000..7d6fd31
--- /dev/null
+++ 
b/dev-python/editorconfig-core-py/files/editorconfig-core-py-0.12.0-no-cli.patch
@@ -0,0 +1,16 @@
+diff --git a/setup.py b/setup.py
+index 297e9cf..9702911 100644
+--- a/setup.py
++++ b/setup.py
+@@ -10,11 +10,6 @@ setup(
+     license='LICENSE.txt',
+     description='EditorConfig File Locator and Interpreter for Python',
+     long_description=open('README.rst').read(),
+-    entry_points = {
+-        'console_scripts': [
+-            'editorconfig = editorconfig.main:main',
+-        ]
+-    },
+     classifiers=[
+         'Operating System :: OS Independent',
+         'Programming Language :: Python',

diff --git a/dev-python/editorconfig-core-py/metadata.xml 
b/dev-python/editorconfig-core-py/metadata.xml
new file mode 100644
index 00000000..a0d72c7
--- /dev/null
+++ b/dev-python/editorconfig-core-py/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>pyt...@gentoo.org</email>
+       </maintainer>
+       <maintainer type="person">
+               <email>chutz...@gentoo.org</email>
+               <name>Patrick McLean</name>
+       </maintainer>
+       <use>
+               <flag name="cli">Install command line interface as well as 
python library</flag>
+       </use>
+       <longdescription lang="en">
+               EditorConfig Python Core provides the same functionality as the
+               EditorConfig C Core. EditorConfig Python core can be used as a
+               command line program or as an importable library.
+       </longdescription>
+</pkgmetadata>

Reply via email to