python-setuptools/python-setuptools.spec

193 lines
5.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-setuptools
#
- update to 44.0.0 - last version with python2 support - add testdata.tar.gz -> missing data for testsuite * Drop support for Python 3.4. * include pyproject.toml in source distribution by default. Projects relying on the previous behavior where pyproject.toml * Setuptools once again declares 'setuptools' in the build-system.requires and adds PEP 517 build support by declaring itself as the build-backend * Fix support for easy_install's find-links option in setup.cfg * Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras. * Mark the easy_install script and setuptools command as deprecated, and use pip when available to fetch/build wheels for missing setup_requires/tests_require requirements, with the following differences in behavior: + support for python_requires + better support for wheels (proper handling of priority with respect to PEP 425 tags) + PEP 517/518 support + eggs are not supported + no support for the allow_hosts easy_install option (index_url/find_links are still honored) + pip environment variables are honored (and take precedence over easy_install options) * Removed the "upload" and "register" commands in favor of twine. * Add support for the license_files option in setup.cfg to automatically include multiple license files in a source distribution. * Update handling of wheels compatibility tags: * add support for manylinux2010 * fix use of removed 'm' ABI flag in Python 3.8 on Windows * Fix empty namespace package installation from wheel. * Setuptools now exposes a new entry point hook "setuptools.finalize_distribution_options", enabling plugins like setuptools_scm to configure options on the distribution at finalization time. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=189
2020-02-04 15:34:09 +01:00
# Copyright (c) 2020 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%bcond_with wheel
%else
%define psuffix %{nil}
%bcond_with test
%bcond_without wheel
%endif
%bcond_without python2
Name: python-setuptools%{psuffix}
Version: 44.1.1
Release: 0
Summary: Enhancements to distutils for building and distributing Python packages
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pypa/setuptools
Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.zip
- update to 44.0.0 - last version with python2 support - add testdata.tar.gz -> missing data for testsuite * Drop support for Python 3.4. * include pyproject.toml in source distribution by default. Projects relying on the previous behavior where pyproject.toml * Setuptools once again declares 'setuptools' in the build-system.requires and adds PEP 517 build support by declaring itself as the build-backend * Fix support for easy_install's find-links option in setup.cfg * Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras. * Mark the easy_install script and setuptools command as deprecated, and use pip when available to fetch/build wheels for missing setup_requires/tests_require requirements, with the following differences in behavior: + support for python_requires + better support for wheels (proper handling of priority with respect to PEP 425 tags) + PEP 517/518 support + eggs are not supported + no support for the allow_hosts easy_install option (index_url/find_links are still honored) + pip environment variables are honored (and take precedence over easy_install options) * Removed the "upload" and "register" commands in favor of twine. * Add support for the license_files option in setup.cfg to automatically include multiple license files in a source distribution. * Update handling of wheels compatibility tags: * add support for manylinux2010 * fix use of removed 'm' ABI flag in Python 3.8 on Windows * Fix empty namespace package installation from wheel. * Setuptools now exposes a new entry point hook "setuptools.finalize_distribution_options", enabling plugins like setuptools_scm to configure options on the distribution at finalization time. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=189
2020-02-04 15:34:09 +01:00
Source3: testdata.tar.gz
Patch0: sort-for-reproducibility.patch
Patch1: importlib.patch
BuildRequires: %{python_module appdirs}
BuildRequires: %{python_module ordered-set}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pyparsing >= 2.0.2}
BuildRequires: %{python_module six}
BuildRequires: %{python_module xml}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
Requires: python-appdirs
Requires: python-base
Requires: python-ordered-set
Requires: python-packaging
Requires: python-six
Accepting request 368985 from home:tbechtold:branches:devel:languages:python - update to 20.2.2: * Issue #502: Correct regression in parsing of multiple version specifiers separated by commas and spaces. * Issue #499: Restore compatiblity for legacy versions by bumping to packaging 16.4. * Changelog now includes release dates and links to PEPs. * Pull Request #173: Replace dual PEP 345 _markerlib implementation and PEP 426 implementation of environment marker support from packaging 16.1 and PEP 508. Fixes Issue #122. See also Pull Request #175, Pull Request #168, and Pull Request #164. Additionally: - ``Requirement.parse`` no longer retains the order of extras. - ``parse_requirements`` now requires that all versions be PEP-440 compliant, as revealed in #499. Packages released with invalid local versions should be re-released using the proper local version syntax, e.g. ``mypkg-1.0+myorg.1``. * Update ``upload_docs`` command to also honor keyring for password resolution. * Added support for using passwords from keyring in the upload command. * Issue #118: Once again omit the package metadata (egg-info) from the list of outputs in ``--record``. This version of setuptools can no longer be used to upgrade pip earlier than 6.0. * `Off-project PR <https://github.com/jaraco/setuptools/pull/32>`_: For FreeBSD, also honor root certificates from ca_root_nss. OBS-URL: https://build.opensuse.org/request/show/368985 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=93
2016-03-09 17:22:46 +01:00
Requires: python-xml
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# The dependency download feature may require SSL, which is in python3-base and python(2)
%ifpython2
Requires: python
%endif
%if %{with test}
BuildRequires: %{python_module Paver}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-fixture-config}
BuildRequires: %{python_module pytest-virtualenv}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools >= %{version}}
BuildRequires: %{python_module wheel}
%if %{with python2}
BuildRequires: python-futures
%endif
%endif
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
Recommends: ca-certificates-mozilla
%endif
%ifpython2
Provides: %{oldpython}-distribute = %{version}
Obsoletes: %{oldpython}-distribute < %{version}
%endif
%if %{with wheel}
BuildRequires: %{python_module wheel}
%endif
%python_subpackages
%description
setuptools is a collection of enhancements to the Python distutils that
allow you to build and distribute Python packages,
especially ones that have dependencies on other packages.
%if %{with wheel}
%package wheel
Summary: Wheels for %{name}
Group: Development/Languages/Python
BuildArch: noarch
%description wheel
Generated wheels for %{name}.
%endif
%prep
%setup -q -n setuptools-%{version}
- update to 44.0.0 - last version with python2 support - add testdata.tar.gz -> missing data for testsuite * Drop support for Python 3.4. * include pyproject.toml in source distribution by default. Projects relying on the previous behavior where pyproject.toml * Setuptools once again declares 'setuptools' in the build-system.requires and adds PEP 517 build support by declaring itself as the build-backend * Fix support for easy_install's find-links option in setup.cfg * Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras. * Mark the easy_install script and setuptools command as deprecated, and use pip when available to fetch/build wheels for missing setup_requires/tests_require requirements, with the following differences in behavior: + support for python_requires + better support for wheels (proper handling of priority with respect to PEP 425 tags) + PEP 517/518 support + eggs are not supported + no support for the allow_hosts easy_install option (index_url/find_links are still honored) + pip environment variables are honored (and take precedence over easy_install options) * Removed the "upload" and "register" commands in favor of twine. * Add support for the license_files option in setup.cfg to automatically include multiple license files in a source distribution. * Update handling of wheels compatibility tags: * add support for manylinux2010 * fix use of removed 'm' ABI flag in Python 3.8 on Windows * Fix empty namespace package installation from wheel. * Setuptools now exposes a new entry point hook "setuptools.finalize_distribution_options", enabling plugins like setuptools_scm to configure options on the distribution at finalization time. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=189
2020-02-04 15:34:09 +01:00
tar -xzvf %{SOURCE3}
%patch0 -p1
%patch1 -p1
find . -type f -name "*.orig" -delete
# fix rpmlint spurious-executable-perm
chmod -x README.rst
# strip shebangs to fix rpmlint warnings
# "explain the sed":
# 1 = first line only
# s@...@...@ = same as s/.../.../ except with @ instead of /
# ^ = start; #!/ = shebang leading characters; .* = rest of line; $ = end
# replace with nothing
sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py
# replace the bundled stuff
find ./ -type f -name \*.py -exec sed -i \
-e 's:from setuptools\.extern\.:from :g' \
-e 's:from pkg_resources\.extern\.:from :g' \
-e 's:pkg_resources\.extern\.::g' \
-e 's:setuptools\.extern\.::g' \
{} \;
find ./ -type f -name \*.py -exec sed -i \
-e 's:from setuptools\.extern ::g' \
-e 's:from pkg_resources\.extern ::g' \
{} \;
find ./ -type f -name \*.py -exec sed -i \
-e 's:from .extern ::g' \
{} \;
%build
%python_build
%if %{with wheel}
%python_exec setup.py bdist_wheel --universal
%endif
%install
%if !%{with test}
%python_install
%prepare_alternative easy_install
%if %{with wheel}
%python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl
%endif
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
# the 4 skipped test rely on the bundled packages but they are
# not available on virtualenv; this is expected behaviour
export LANG=en_US.UTF-8
# tests need imports local source dir
export PYTHONPATH=$(pwd)
%pytest -k 'not (test_clean_env_install or test_pip_upgrade_from_source or test_test_command_install_requirements or test_no_missing_dependencies)'
%endif
%if !%{with test}
%post
%python_install_alternative easy_install
%postun
%python_uninstall_alternative easy_install
%files %{python_files}
%license LICENSE
Accepting request 405571 from home:tbechtold:branches:devel:languages:python - update to 23.1.0: * #619: Deprecated ``tag_svn_revision`` distribution option. * #611: Removed ARM executables for CLI and GUI script launchers on Windows. If this was a feature you cared about, please comment in the ticket. * #604: Removed docs building support. The project now relies on documentation hosted at https://setuptools.readthedocs.io/. * #604: Restore repository for upload_docs command to restore publishing of docs during release. * #589: Upload releases to pypi.io using the upload hostname and legacy path. * #589: Releases are now uploaded to pypi.io (Warehouse) even when releases are made on Twine via Travis. * #589: Releases are now uploaded to pypi.io (Warehouse). * #190: On Python 2, if unicode is passed for packages to ``build_py`` command, it will be handled just as with text on Python 3. * #598: Setuptools now lists itself first in the User-Agent for web requests, better following the guidelines in `RFC 7231 <https://tools.ietf.org/html/rfc7231#section-5.5.3>`_. * Minor fixes to changelog and docs. * #261: Exclude directories when resolving globs in package_data. * #539: In the easy_install get_site_dirs, honor all paths found in ``site.getsitepackages``. * #572: In build_ext, now always import ``_CONFIG_VARS`` from ``distutils`` rather than from ``sysconfig`` OBS-URL: https://build.opensuse.org/request/show/405571 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=95
2016-07-04 10:17:56 +02:00
%doc CHANGES.rst README.rst
%python_alternative %{_bindir}/easy_install
%{python_sitelib}/setuptools
%{python_sitelib}/setuptools-%{version}-py%{python_version}.egg-info
- Update to version 2.1: * Issue #129: Suppress inspection of '*.whl' files when searching for files in a zip-imported file. * Issue #131: Fix RuntimeError when constructing an egg fetcher. - Changes from version 2.0.2: * Fix NameError during installation with Python implementations (e.g. Jython) not containing parser module. * Fix NameError in sdist:re_finder. - Changes from version 2.0.1: * Issue #124: Fixed error in list detection in upload_docs. - Changes from version 2.0: * Issue #121: Exempt lib2to3 pickled grammars from DirectorySandbox. * Issue #41: Dropped support for Python 2.4 and Python 2.5. Clients requiring setuptools for those versions of Python should use setuptools 1.x. * Removed setuptools.command.easy_install.HAS_USER_SITE. Clients expecting this boolean variable should use site.ENABLE_USER_SITE instead. * Removed pkg_resources.ImpWrapper. Clients that expected this class should use pkgutil.ImpImporter instead. - Changes from version 1.4.2: * Issue #116: Correct TypeError when reading a local package index on Python 3. - Changes from version 1.4.1: * Issue #114: Use sys.getfilesystemencoding for decoding config in bdist_wininst distributions. * Issue #105 and Issue #113: Establish a more robust technique for determining the terminal encoding - Changes from version 1.4: * Issue #27: easy_install will now use credentials from .pypirc if present for connecting to the package index. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=56
2014-02-10 15:53:17 +01:00
%{python_sitelib}/easy_install.py*
%pycache_only %{python_sitelib}/__pycache__/easy_install.*
%dir %{python_sitelib}/pkg_resources
%{python_sitelib}/pkg_resources/*
%endif
%if %{with wheel}
%files %{python_files wheel}
%dir %{python_sitelib}/../wheels
%{python_sitelib}/../wheels/*
%endif
%changelog