15
0
Files
python-devpi-client/python-devpi-client.spec

125 lines
3.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-devpi-client
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-devpi-client%{psuffix}
Version: 7.2.0
Release: 0
Summary: Client for devpi
License: MIT
URL: https://github.com/devpi/devpi
Source: https://files.pythonhosted.org/packages/source/d/devpi-client/devpi-client-%{version}.tar.gz
- Update to 6.0.3: * Fix #919: Retry 3 times and wait a moment on PermissionError during file removal to fix race condition after running tox. * Restore ability to build docs if project uses separate build and source directories for documentation. * Fix for changes in pypitoken 6.x. - 6.0.2 (2022-09-28) * Better error message when trying to use ``devpi index`` which requires authentication (devpi-lockdown). - 6.0.1 (2022-08-16) * fix #913: ``main.Hub.workdir`` cleanup (exit) can now handle read-only files (like those created by git). * Print info when ``DEVPI_INDEX`` environment variable is in use and allow relative index specification for it. - 6.0.0 (2022-07-19) * Removed support for ``--detox`` option. * When uploading we no longer "register" the package first. That requirement was removed from PyPI and devpi-server for some time. * Use ``sphinx-build`` command instead of ``setup.py build_sphinx`` when building documentation. * Removed tox dependency, instead ``devpi test`` looks for the ``tox`` binary in the path. * The ``--venv`` option will abort when no virtualenv exists at the location, it will not create a virtualenv anymore. * Fix #218: use new pip.conf location by default and warn if the legacy location exists. * Fix #38: add ``--user``/``-u`` option to ``use`` command to limit index listing to a specific user. * Fix #437: when the ``DEVPI_INDEX`` environment variable is set, it temporarily overwrites the current index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-devpi-client?expand=0&rev=13
2023-04-10 10:41:48 +00:00
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
- Update to 6.0.3: * Fix #919: Retry 3 times and wait a moment on PermissionError during file removal to fix race condition after running tox. * Restore ability to build docs if project uses separate build and source directories for documentation. * Fix for changes in pypitoken 6.x. - 6.0.2 (2022-09-28) * Better error message when trying to use ``devpi index`` which requires authentication (devpi-lockdown). - 6.0.1 (2022-08-16) * fix #913: ``main.Hub.workdir`` cleanup (exit) can now handle read-only files (like those created by git). * Print info when ``DEVPI_INDEX`` environment variable is in use and allow relative index specification for it. - 6.0.0 (2022-07-19) * Removed support for ``--detox`` option. * When uploading we no longer "register" the package first. That requirement was removed from PyPI and devpi-server for some time. * Use ``sphinx-build`` command instead of ``setup.py build_sphinx`` when building documentation. * Removed tox dependency, instead ``devpi test`` looks for the ``tox`` binary in the path. * The ``--venv`` option will abort when no virtualenv exists at the location, it will not create a virtualenv anymore. * Fix #218: use new pip.conf location by default and warn if the legacy location exists. * Fix #38: add ``--user``/``-u`` option to ``use`` command to limit index listing to a specific user. * Fix #437: when the ``DEVPI_INDEX`` environment variable is set, it temporarily overwrites the current index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-devpi-client?expand=0&rev=13
2023-04-10 10:41:48 +00:00
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-build >= 0.7.0
Requires: python-check-manifest >= 0.28
Requires: python-devpi-common >= 4.0
Requires: python-iniconfig
Requires: python-pkginfo >= 1.10.0
Requires: python-platformdirs
Requires: python-pluggy >= 0.6.0
Requires: python-tox >= 3.1.0
Requires: python-virtualenv
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: git-core
Recommends: python-Sphinx
BuildArch: noarch
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module devpi-client = %{version}}
BuildRequires: %{python_module devpi-common >= 4}
BuildRequires: %{python_module devpi-server}
BuildRequires: %{python_module pytest}
BuildRequires: git-core
%endif
# /SECTION
%python_subpackages
%description
devpi-client is a command line tool with sub commands for creating users, using
indexes, uploading to and installing from indexes, as well as a "test" command
for invoking tox.
%prep
%autosetup -p1 -n devpi-client-%{version}
rm tox.ini
sed -i 's/"python \(setup.py[^"]*\)"/(sys.executable + " \1")/' testing/test_upload.py
sed -i 's/"python", "setup.py"/sys.executable, "setup.py"/' testing/test_test.py
%build
- Update to 6.0.3: * Fix #919: Retry 3 times and wait a moment on PermissionError during file removal to fix race condition after running tox. * Restore ability to build docs if project uses separate build and source directories for documentation. * Fix for changes in pypitoken 6.x. - 6.0.2 (2022-09-28) * Better error message when trying to use ``devpi index`` which requires authentication (devpi-lockdown). - 6.0.1 (2022-08-16) * fix #913: ``main.Hub.workdir`` cleanup (exit) can now handle read-only files (like those created by git). * Print info when ``DEVPI_INDEX`` environment variable is in use and allow relative index specification for it. - 6.0.0 (2022-07-19) * Removed support for ``--detox`` option. * When uploading we no longer "register" the package first. That requirement was removed from PyPI and devpi-server for some time. * Use ``sphinx-build`` command instead of ``setup.py build_sphinx`` when building documentation. * Removed tox dependency, instead ``devpi test`` looks for the ``tox`` binary in the path. * The ``--venv`` option will abort when no virtualenv exists at the location, it will not create a virtualenv anymore. * Fix #218: use new pip.conf location by default and warn if the legacy location exists. * Fix #38: add ``--user``/``-u`` option to ``use`` command to limit index listing to a specific user. * Fix #437: when the ``DEVPI_INDEX`` environment variable is set, it temporarily overwrites the current index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-devpi-client?expand=0&rev=13
2023-04-10 10:41:48 +00:00
%pyproject_wheel
%install
%if !%{with test}
- Update to 6.0.3: * Fix #919: Retry 3 times and wait a moment on PermissionError during file removal to fix race condition after running tox. * Restore ability to build docs if project uses separate build and source directories for documentation. * Fix for changes in pypitoken 6.x. - 6.0.2 (2022-09-28) * Better error message when trying to use ``devpi index`` which requires authentication (devpi-lockdown). - 6.0.1 (2022-08-16) * fix #913: ``main.Hub.workdir`` cleanup (exit) can now handle read-only files (like those created by git). * Print info when ``DEVPI_INDEX`` environment variable is in use and allow relative index specification for it. - 6.0.0 (2022-07-19) * Removed support for ``--detox`` option. * When uploading we no longer "register" the package first. That requirement was removed from PyPI and devpi-server for some time. * Use ``sphinx-build`` command instead of ``setup.py build_sphinx`` when building documentation. * Removed tox dependency, instead ``devpi test`` looks for the ``tox`` binary in the path. * The ``--venv`` option will abort when no virtualenv exists at the location, it will not create a virtualenv anymore. * Fix #218: use new pip.conf location by default and warn if the legacy location exists. * Fix #38: add ``--user``/``-u`` option to ``use`` command to limit index listing to a specific user. * Fix #437: when the ``DEVPI_INDEX`` environment variable is set, it temporarily overwrites the current index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-devpi-client?expand=0&rev=13
2023-04-10 10:41:48 +00:00
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/devpi
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
export LANG=en_US.UTF-8
export PYTHONDONTWRITEBYTECODE=1
export PATH=$PATH:%{buildroot}/%{_bindir}
# Unknown failures gh#devpi/devpi#706
# test_help: devpi binary is not available (update-alternatives)
- Update to 6.0.3: * Fix #919: Retry 3 times and wait a moment on PermissionError during file removal to fix race condition after running tox. * Restore ability to build docs if project uses separate build and source directories for documentation. * Fix for changes in pypitoken 6.x. - 6.0.2 (2022-09-28) * Better error message when trying to use ``devpi index`` which requires authentication (devpi-lockdown). - 6.0.1 (2022-08-16) * fix #913: ``main.Hub.workdir`` cleanup (exit) can now handle read-only files (like those created by git). * Print info when ``DEVPI_INDEX`` environment variable is in use and allow relative index specification for it. - 6.0.0 (2022-07-19) * Removed support for ``--detox`` option. * When uploading we no longer "register" the package first. That requirement was removed from PyPI and devpi-server for some time. * Use ``sphinx-build`` command instead of ``setup.py build_sphinx`` when building documentation. * Removed tox dependency, instead ``devpi test`` looks for the ``tox`` binary in the path. * The ``--venv`` option will abort when no virtualenv exists at the location, it will not create a virtualenv anymore. * Fix #218: use new pip.conf location by default and warn if the legacy location exists. * Fix #38: add ``--user``/``-u`` option to ``use`` command to limit index listing to a specific user. * Fix #437: when the ``DEVPI_INDEX`` environment variable is set, it temporarily overwrites the current index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-devpi-client?expand=0&rev=13
2023-04-10 10:41:48 +00:00
donttest="test_simple_install_new_venv_workflow or test_simple_install_activated_venv_workflow or test_help"
# test_upload: requires network to work
donttest+=" or test_upload"
donttest+=" or test_main_example_with_basic_auth"
# No module named 'pypitoken'
donttest+=" or test_derive_devpi_token or test_derive_legacy_token or test_derive_token"
# error deleting VIRTUAL_ENV
donttest+=" or test_simple_install_missing_venvdir"
# Broken tests with python3.12 because missing setuptools
donttest+=" or test_main_example or test_specific_version or test_pkgname_with_dashes"
- Update to 6.0.3: * Fix #919: Retry 3 times and wait a moment on PermissionError during file removal to fix race condition after running tox. * Restore ability to build docs if project uses separate build and source directories for documentation. * Fix for changes in pypitoken 6.x. - 6.0.2 (2022-09-28) * Better error message when trying to use ``devpi index`` which requires authentication (devpi-lockdown). - 6.0.1 (2022-08-16) * fix #913: ``main.Hub.workdir`` cleanup (exit) can now handle read-only files (like those created by git). * Print info when ``DEVPI_INDEX`` environment variable is in use and allow relative index specification for it. - 6.0.0 (2022-07-19) * Removed support for ``--detox`` option. * When uploading we no longer "register" the package first. That requirement was removed from PyPI and devpi-server for some time. * Use ``sphinx-build`` command instead of ``setup.py build_sphinx`` when building documentation. * Removed tox dependency, instead ``devpi test`` looks for the ``tox`` binary in the path. * The ``--venv`` option will abort when no virtualenv exists at the location, it will not create a virtualenv anymore. * Fix #218: use new pip.conf location by default and warn if the legacy location exists. * Fix #38: add ``--user``/``-u`` option to ``use`` command to limit index listing to a specific user. * Fix #437: when the ``DEVPI_INDEX`` environment variable is set, it temporarily overwrites the current index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-devpi-client?expand=0&rev=13
2023-04-10 10:41:48 +00:00
%pytest -k "not ($donttest)"
%endif
%post
%python_install_alternative devpi
%postun
%python_uninstall_alternative devpi
%if !%{with test}
%files %{python_files}
%doc AUTHORS CHANGELOG README.rst
%license LICENSE
%python_alternative %{_bindir}/devpi
- Update to 6.0.3: * Fix #919: Retry 3 times and wait a moment on PermissionError during file removal to fix race condition after running tox. * Restore ability to build docs if project uses separate build and source directories for documentation. * Fix for changes in pypitoken 6.x. - 6.0.2 (2022-09-28) * Better error message when trying to use ``devpi index`` which requires authentication (devpi-lockdown). - 6.0.1 (2022-08-16) * fix #913: ``main.Hub.workdir`` cleanup (exit) can now handle read-only files (like those created by git). * Print info when ``DEVPI_INDEX`` environment variable is in use and allow relative index specification for it. - 6.0.0 (2022-07-19) * Removed support for ``--detox`` option. * When uploading we no longer "register" the package first. That requirement was removed from PyPI and devpi-server for some time. * Use ``sphinx-build`` command instead of ``setup.py build_sphinx`` when building documentation. * Removed tox dependency, instead ``devpi test`` looks for the ``tox`` binary in the path. * The ``--venv`` option will abort when no virtualenv exists at the location, it will not create a virtualenv anymore. * Fix #218: use new pip.conf location by default and warn if the legacy location exists. * Fix #38: add ``--user``/``-u`` option to ``use`` command to limit index listing to a specific user. * Fix #437: when the ``DEVPI_INDEX`` environment variable is set, it temporarily overwrites the current index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-devpi-client?expand=0&rev=13
2023-04-10 10:41:48 +00:00
%{python_sitelib}/devpi
%{python_sitelib}/devpi_client-%{version}*-info
%endif
%changelog