diff --git a/srcpkgs/python-entrypoints/patches/entrypoints-setup.py.patch b/srcpkgs/python-entrypoints/patches/entrypoints-setup.py.patch new file mode 100644 index 00000000000..f13e5e0b71a --- /dev/null +++ b/srcpkgs/python-entrypoints/patches/entrypoints-setup.py.patch @@ -0,0 +1,23 @@ +--- /dev/null ++++ setup.py +@@ -0,0 +1,20 @@ ++from setuptools import setup ++ ++def get_version(): ++ with open('entrypoints.py') as f: ++ for line in f: ++ if line.startswith('__version__'): ++ return eval(line.split('=')[-1]) ++ ++setup( ++ name='entrypoints', ++ version=get_version(), ++ description='Discover and load entry points from installed packages', ++ author='Thomas Kluyver', ++ author_email='thomas@kluyver.me.uk', ++ url='https://github.com/takluyver/entrypoints', ++ license='MIT', ++ extras_require={ ++ ':python_version == "2.7"': ['configparser'], ++ }, ++) diff --git a/srcpkgs/python-entrypoints/template b/srcpkgs/python-entrypoints/template new file mode 100644 index 00000000000..7cb68d256d6 --- /dev/null +++ b/srcpkgs/python-entrypoints/template @@ -0,0 +1,36 @@ +# Template file for 'python-entrypoints' +pkgname=python-entrypoints +version=0.2.2 +revision=1 +noarch=yes +wrksrc="entrypoints-${version}" +build_style=python-module +python_versions="2.7 3.4" +pycompile_module="entrypoints.py" +hostmakedepends="python-setuptools python3.4-setuptools" +depends="python-backports.configparser" +short_desc="Discover and load entry points from installed packages (Python2)" +maintainer="Alessio Sergi " +homepage="https://github.com/takluyver/entrypoints" +license="MIT" +distfiles="https://github.com/takluyver/entrypoints/archive/${version}.tar.gz" +checksum=e54b5df8bb971507278c65df96e6486cf4aea0cdac384d0102ea0339e0a4f82b + +post_install() { + for pyver in $python_versions; do + vinstall entrypoints.py 644 usr/lib/python${pyver}/site-packages + done + vlicense LICENSE +} + +python3.4-entrypoints_package() { + noarch=yes + pycompile_version="3.4" + pycompile_module="entrypoints.py" + depends="python3.4" + short_desc="${short_desc/Python2/Python3.4}" + pkg_install() { + vmove usr/lib/python3.4 + vlicense LICENSE + } +} diff --git a/srcpkgs/python3.4-entrypoints b/srcpkgs/python3.4-entrypoints new file mode 120000 index 00000000000..33316dfeacf --- /dev/null +++ b/srcpkgs/python3.4-entrypoints @@ -0,0 +1 @@ +python-entrypoints \ No newline at end of file