[packages/python-twine] - initial

qboosh qboosh at pld-linux.org
Mon Dec 8 21:30:48 CET 2025


commit 929f57f8fd63a9b3739f4040143643d33f17d741
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Dec 8 21:30:56 2025 +0100

    - initial

 python-twine.spec | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 175 insertions(+)
---
diff --git a/python-twine.spec b/python-twine.spec
new file mode 100644
index 0000000..8ae1420
--- /dev/null
+++ b/python-twine.spec
@@ -0,0 +1,175 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module (built from python3-twine.spec)
+
+Summary:	Collection of utilities for publishing packages on PyPI
+Summary(pl.UTF-8):	Zbiór narzędzi do publikowania pakietów na PyPI
+Name:		python-twine
+# keep 1.x here for python2 support
+Version:	1.15.0
+Release:	1
+License:	Apache v2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/twine/
+Source0:	https://files.pythonhosted.org/packages/source/t/twine/twine-%{version}.tar.gz
+# Source0-md5:	ae1408a43e6259fa787b52438b720905
+URL:		https://pypi.org/project/twine/
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools >= 1:0.7.0
+%if %{with tests}
+BuildRequires:	python-pkginfo >= 1.4.2
+BuildRequires:	python-pyblake2
+BuildRequires:	python-pytest
+BuildRequires:	python-readme_renderer >= 21.0
+BuildRequires:	python-requests >= 2.17
+BuildRequires:	python-requests-toolbelt >= 0.8.0
+BuildRequires:	python-tqdm >= 4.14
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.4
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pkginfo >= 1.4.2
+%if "%{_ver_lt %{py3_ver} 3.6}" == "1"
+BuildRequires:	python3-pyblake2
+%endif
+BuildRequires:	python3-pytest
+BuildRequires:	python3-readme_renderer >= 21.0
+BuildRequires:	python3-requests >= 2.17
+BuildRequires:	python3-requests-toolbelt >= 0.8.0
+BuildRequires:	python3-tqdm >= 4.14
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	python-readme_renderer >= 21.0
+BuildRequires:	python-releases >= 1.4.0
+BuildRequires:	python-sphinx_rtd_theme >= 0.2.4
+BuildRequires:	sphinx-pdg-2 >= 1.7.0
+%endif
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Twine is a utility for publishing Python packages on PyPI.
+
+It provides build system independent uploads of source and binary
+distribution artifacts for both new and existing projects.
+
+%description -l pl.UTF-8
+Twine to narzędzie do publikowania pakietów Pythona na PyPI.
+
+Zapewnia wysyłanie artefaktów dytrybucji źródełowych i binarnych
+niezależne od systemu budowania, zarówno dla nowych, jak i
+istniejących projektów.
+
+%package -n python3-twine
+Summary:	Collection of utilities for publishing packages on PyPI
+Summary(pl.UTF-8):	Zbiór narzędzi do publikowania pakietów na PyPI
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.4
+
+%description -n python3-twine
+Twine is a utility for publishing Python packages on PyPI.
+
+It provides build system independent uploads of source and binary
+distribution artifacts for both new and existing projects.
+
+%description -n python3-twine -l pl.UTF-8
+Twine to narzędzie do publikowania pakietów Pythona na PyPI.
+
+Zapewnia wysyłanie artefaktów dytrybucji źródełowych i binarnych
+niezależne od systemu budowania, zarówno dla nowych, jak i
+istniejących projektów.
+
+%package apidocs
+Summary:	API documentation for Python twine module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona twine
+Group:		Documentation
+
+%description apidocs
+API documentation for Python twine module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona twine.
+
+%prep
+%setup -q -n twine-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-2
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/twine{,-2}
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/twine{,-3}
+ln -sf twine-3 $RPM_BUILD_ROOT%{_bindir}/twine
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS README.rst
+%attr(755,root,root) %{_bindir}/twine-2
+%{py_sitescriptdir}/twine
+%{py_sitescriptdir}/twine-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-twine
+%defattr(644,root,root,755)
+%doc AUTHORS README.rst
+%attr(755,root,root) %{_bindir}/twine-3
+%{_bindir}/twine
+%{py3_sitescriptdir}/twine
+%{py3_sitescriptdir}/twine-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-twine.git/commitdiff/929f57f8fd63a9b3739f4040143643d33f17d741



More information about the pld-cvs-commit mailing list