diff --git a/srcpkgs/python-testpath/patches/testpath-setup.py.patch b/srcpkgs/python-testpath/patches/testpath-setup.py.patch new file mode 100644 index 0000000000..6379243cf8 --- /dev/null +++ b/srcpkgs/python-testpath/patches/testpath-setup.py.patch @@ -0,0 +1,34 @@ +--- /dev/null ++++ setup.py +@@ -0,0 +1,31 @@ ++import os ++import re ++from io import open ++ ++from setuptools import setup ++ ++with open(os.path.join('testpath', '__init__.py'), encoding='utf-8') as f: ++ version = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read(), re.M).group(1) ++ ++with open('README.rst', encoding='utf-8') as f: ++ long_description = f.read() ++ ++setup( ++ name='testpath', ++ version=version, ++ description='Test utilities for code working with files and commands', ++ long_description=long_description, ++ author='Jupyter Development Team', ++ author_email='jupyter@googlegroups.com', ++ url='https://github.com/jupyter/testpath', ++ license='MIT', ++ packages=['testpath'], ++ classifiers=[ ++ 'Intended Audience :: Developers', ++ 'License :: OSI Approved :: MIT License', ++ 'Programming Language :: Python', ++ 'Programming Language :: Python :: 2', ++ 'Programming Language :: Python :: 3', ++ 'Topic :: Software Development :: Testing', ++ ] ++) diff --git a/srcpkgs/python-testpath/template b/srcpkgs/python-testpath/template new file mode 100644 index 0000000000..b772c6a602 --- /dev/null +++ b/srcpkgs/python-testpath/template @@ -0,0 +1,34 @@ +# Template file for 'python-testpath' +pkgname=python-testpath +version=0.3 +revision=1 +noarch=yes +wrksrc="testpath-${version}" +build_style=python-module +pycompile_module="testpath" +hostmakedepends="python-setuptools python3-setuptools" +depends="python" +short_desc="Test utilities for code working with files and commands (Python2)" +maintainer="Alessio Sergi " +homepage="https://github.com/jupyter/testpath" +license="MIT" +distfiles="https://github.com/jupyter/testpath/archive/${version}.tar.gz" +checksum=01cc3cd59a59d42b238252774b9ebfc9d2af1d0d9bac81d7801409f570b1cda5 + +pre_build() { + rm -f testpath/cli-*.exe +} +post_install() { + vlicense LICENSE +} + +python3-testpath_package() { + noarch=yes + depends="python3" + pycompile_module="testpath" + short_desc="${short_desc/Python2/Python3}" + pkg_install() { + vmove usr/lib/python3* + vlicense LICENSE + } +} diff --git a/srcpkgs/python3-testpath b/srcpkgs/python3-testpath new file mode 120000 index 0000000000..51899d175b --- /dev/null +++ b/srcpkgs/python3-testpath @@ -0,0 +1 @@ +python-testpath \ No newline at end of file