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

Package-Manager: portage-2.3.2
This commit is contained in:
Patrick McLean
2016-11-07 14:18:47 -08:00
parent 1d03f66287
commit bd447ffec1
4 changed files with 90 additions and 0 deletions

View File

@@ -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

View File

@@ -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
}

View File

@@ -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',

View File

@@ -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>