summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2016-11-07 14:18:47 -0800
committerPatrick McLean <chutzpah@gentoo.org>2016-11-07 14:18:47 -0800
commitbd447ffec18ed3e769a062387ce969b738f73f10 (patch)
tree33b15dc451ab4bdb47f6bab44f6ffc787b06dfdb /dev-python
parentapp-benchmarks/wrk: Clean up old. (diff)
downloadgentoo-bd447ffec18ed3e769a062387ce969b738f73f10.tar.gz
gentoo-bd447ffec18ed3e769a062387ce969b738f73f10.tar.bz2
gentoo-bd447ffec18ed3e769a062387ce969b738f73f10.zip
dev-python/editorconfig-core-py: New package, python implementation of EditorConfig
Package-Manager: portage-2.3.2
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/editorconfig-core-py/Manifest2
-rw-r--r--dev-python/editorconfig-core-py/editorconfig-core-py-0.12.0.ebuild53
-rw-r--r--dev-python/editorconfig-core-py/files/editorconfig-core-py-0.12.0-no-cli.patch16
-rw-r--r--dev-python/editorconfig-core-py/metadata.xml19
4 files changed, 90 insertions, 0 deletions
diff --git a/dev-python/editorconfig-core-py/Manifest b/dev-python/editorconfig-core-py/Manifest
new file mode 100644
index 000000000000..3dc70b84e3b4
--- /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 000000000000..be727fdaa48a
--- /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 000000000000..7d6fd31c3cc8
--- /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 000000000000..a0d72c7546ea
--- /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>python@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>chutzpah@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>