]> git.pld-linux.org Git - packages/python3-testpath.git/commitdiff
- python-testpath.spec updated to 0.6.0 for python 3.5+ auto/th/python3-testpath-0.6.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 20 Mar 2022 19:09:54 +0000 (20:09 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 20 Mar 2022 19:09:54 +0000 (20:09 +0100)
- hacked to build using setuptools

python3-testpath.spec [moved from python-testpath.spec with 56% similarity]

similarity index 56%
rename from python-testpath.spec
rename to python3-testpath.spec
index 3abbcf1d155c6b29f1c253e0841cd644abcb2078..b36449bfb481650d2022e9744878b0082f89e574 100644 (file)
@@ -2,39 +2,29 @@
 # Conditional build:
 %bcond_without doc     # Sphinx documentation
 %bcond_without tests   # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
 
 Summary:       Test utilities for code working with files and commands
 Summary(pl.UTF-8):     Narzędzia testowe dla kodu działającego na plikach i poleceniach
-Name:          python-testpath
-Version:       0.4.4
-Release:       2
+Name:          python3-testpath
+Version:       0.6.0
+Release:       1
 License:       BSD
 Group:         Libraries/Python
 #Source0Download: https://pypi.org/simple/testpath/
 Source0:       https://files.pythonhosted.org/packages/source/t/testpath/testpath-%{version}.tar.gz
-# Source0-md5: 297100d49a6f20859383434a182cf426
+# Source0-md5: 9fd4339f76da12d15bc718e4aa2566e9
 URL:           https://pypi.org/project/testpath/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-%if %{with tests}
-BuildRequires: python-pathlib2
-BuildRequires: python-pytest
-%endif
-%endif
-%if %{with python3}
 BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-setuptools
 %if %{with tests}
 BuildRequires: python3-pytest
 %endif
-%endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
 %if %{with doc}
-BuildRequires: sphinx-pdg
+BuildRequires: sphinx-pdg-3
 %endif
-Requires:      python-modules >= 1:2.7
+Requires:      python3-modules >= 1:3.5
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -53,27 +43,6 @@ Zawiera funkcje do sprawdzania elementów w systemie plików oraz
 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
 wywołań.
 
-%package -n python3-testpath
-Summary:       Test utilities for code working with files and commands
-Summary(pl.UTF-8):     Narzędzia testowe dla kodu działającego na plikach i poleceniach
-Group:         Libraries/Python
-Requires:      python3-modules >= 1:3.5
-
-%description -n python3-testpath
-Testpath is a collection of utilities for Python code working with
-files and commands.
-
-It contains functions to check things on the filesystem, and tools for
-mocking system commands and recording calls to those.
-
-%description -n python3-testpath -l pl.UTF-8
-Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
-i poleceniach.
-
-Zawiera funkcje do sprawdzania elementów w systemie plików oraz
-narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
-wywołań.
-
 %package apidocs
 Summary:       API documentation for Python testpath module
 Summary(pl.UTF-8):     Dokumentacja API modułu Pythona testpath
@@ -88,58 +57,60 @@ Dokumentacja API modułu Pythona testpath.
 %prep
 %setup -q -n testpath-%{version}
 
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m pytest tests
-%endif
-%endif
+# setuptools stub
+cat >setup.py <<EOF
+from setuptools import setup
+setup()
+EOF
+
+# until we have flit...
+# (extracted from pyproject.toml - keep in sync!)
+cat >setup.cfg <<'EOF'
+[metadata]
+name = testpath
+version = %{version}
+description = Test utilities for code working with files and commands
+author = Jupyter Development Team
+author_email = jupyter@googlegroups.com
+license = BSD
+license_file = LICENSE
+classifiers =
+    Intended Audience :: Developers
+    License :: OSI Approved :: BSD License
+    Programming Language :: Python
+    Programming Language :: Python :: 3
+    Topic :: Software Development :: Testing
+[options]
+packages = testpath
+python_requires = >=3.5
+EOF
 
-%if %{with python3}
+%build
 %py3_build
 
 %if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 %{__python3} -m pytest tests
 %endif
-%endif
 
 %if %{with doc}
-%{__make} -C doc html
+%{__make} -C doc html \
+       SPHINXBUILD=sphinx-build-3
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
 %py3_install
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README.rst
-%{py_sitescriptdir}/testpath
-%{py_sitescriptdir}/testpath-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-testpath
-%defattr(644,root,root,755)
-%doc LICENSE README.rst
 %{py3_sitescriptdir}/testpath
 %{py3_sitescriptdir}/testpath-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files apidocs
This page took 0.09929 seconds and 4 git commands to generate.