Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37040681
en ru br
Репозитории ALT
S:42.0.0-alt3
5.1: 0.6-alt1.c9
4.1: 0.6-alt1.c7.1
4.0: 0.6-alt1.c5
www.altlinux.org/Changes

Группа :: Разработка/Python
Пакет: python-module-setuptools

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define mname setuptools

%def_with check

Name: python-module-%mname
Epoch: 1
Version: 40.6.3
Release: alt1

Summary: Easily download, build, install, upgrade, and uninstall Python packages
License: MIT
Group: Development/Python
# Source-git: https://github.com/pypa/setuptools.git
Url: https://pypi.org/project/setuptools/

Provides: python-module-distribute = %EVR
Obsoletes: python-module-distribute <= 0.6.35-alt1

Requires: python-module-pkg_resources = %EVR
# setuptools has commands for doing binary builds; for them to work always:
Requires: python-devel

Source: %name-%version.tar
Patch: %name-%version-alt.patch

BuildRequires(pre): rpm-build-python
BuildRequires(pre): rpm-build-python3
BuildPreReq: python %py_dependencies distutils

%if_with check
BuildRequires: python-module-futures
BuildRequires: python-module-pytest
BuildRequires: python-module-pytest-cov
BuildRequires: python-module-pytest-virtualenv
BuildRequires: python-module-virtualenv
BuildRequires: python-module-path
BuildRequires: python-module-mock
BuildRequires: python-module-pip
BuildRequires: python-module-wheel
BuildRequires: python-module-contextlib2
BuildRequires: python-module-pytest-fixture-config
BuildRequires: python-module-pytest-flake8
BuildRequires: python3-module-Paver
BuildRequires: python3-module-pytest
BuildRequires: python3-module-pytest-cov
BuildRequires: python3-module-pytest-virtualenv
BuildRequires: python3-module-virtualenv
BuildRequires: python3-module-path
BuildRequires: python3-module-mock
BuildRequires: python3-module-pip
BuildRequires: python3-module-wheel
BuildRequires: python3-module-contextlib2
BuildRequires: python3-module-pytest-fixture-config
BuildRequires: python3-module-pytest-flake8
BuildRequires: python3-module-tox
# For the tests of the setuptools commands to do binary builds:
BuildPreReq: python-devel
BuildPreReq: python3-dev
%endif

BuildArch: noarch

%package -n python-module-pkg_resources
Summary: Package Discovery and Resource Access for Python2 libraries
Group: Development/Python
# Not separated yet:
Conflicts: python-module-%mname < 39.2.0-alt3

%package docs
Summary: Documentation for Setuptools
Group: Development/Documentation
Provides: python-module-distribute-docs = %EVR

%package -n python3-module-%mname
Summary: Python Distutils Enhancements
Group: Development/Python3
Provides: python3-module-distribute = %EVR
Requires: python3-module-pkg_resources = %EVR
# setuptools has commands for doing binary builds; for them to work always:
Requires: python3-dev
# skip requires of self
%filter_from_requires /python3\(\.[[:digit:]]\)\?(pkg_resources\.extern\..*)/d
%filter_from_requires /python3\(\.[[:digit:]]\)\?(setuptools\.extern\..*)/d

%package -n python3-module-pkg_resources
Summary: Package Discovery and Resource Access for Python3 libraries
Group: Development/Python3
# Not separated yet:
Conflicts: python3-module-%mname < 39.2.0-alt3

%description
Setuptools is a collection of enhancements to the Python distutils
that allow you to more easily build and distribute Python packages,
especially ones that have dependencies on other packages.

%description docs
Distribute is intended to replace Setuptools as the standard method for
working with Python module distributions.

This package contains documentation for Distribute.

%description -n python3-module-%mname
Setuptools is a collection of enhancements to the Python3 distutils
that allow you to more easily build and distribute Python3 packages,
especially ones that have dependencies on other packages.

%global pkg_resources_desc The "pkg_resources" module distributed with "setuptools" provides an API\
for Python libraries to access their resource files, and for extensible\
applications and frameworks to automatically discover plugins.  It also\
provides runtime support for using C extensions that are inside zipfile-format\
eggs, support for merging packages that have separately-distributed modules or\
subpackages, and APIs for managing Python's current "working set" of active\
packages.\
\
Any Python code can make use of pkg_resources at runtime (unlike setuptools,\
whose purpose is preparing packages).

%description -n python-module-pkg_resources
%pkg_resources_desc

This package contains pkg_resources for Python2.

%description -n python3-module-pkg_resources
%pkg_resources_desc

This package contains pkg_resources for Python3.

%prep
%setup
%patch0 -p1

# Remove bundled exes

rm -f setuptools/*.exe

# do not generate version like release.postdate, we need release one

sed -i '/^tag_build =.*/d;/^tag_date = 1/d' setup.cfg

# cleanup after other builds:

rm -rf ../python3
cp -a . -T ../python3

%build
python bootstrap.py
%global python_setup_buildrequires %nil
%python_build_debug

pushd ../python3
python3 bootstrap.py
%global python3_setup_buildrequires %nil
%python3_build_debug
popd

%install
%python_install

pushd ../python3
%python3_install
popd

rm %buildroot%_bindir/easy_install
ln -s easy_install-%_python_version -T %buildroot%_bindir/easy_install
ln -s easy_install-%_python3_version -T %buildroot%_bindir/easy_install3

%check
sed -i -e '/\[testenv\]/a whitelist_externals =\
   \/bin\/cp\
   \/bin\/sed\
commands_pre =\
   \/bin\/cp %_bindir\/py.test3 \{envbindir\}\/pytest\
   \/bin\/sed -i \x271c #!\{envpython\}\x27 \{envbindir\}\/pytest\
   {envbindir}\/pip install -I --no-build-isolation -e {toxinidir}' \
-e '/usedevelop=/d' tox.ini
export LC_ALL=C.UTF-8
export PIP_NO_INDEX=YES
export TOX_TESTENV_PASSENV='LC_ALL'
export TOXENV=py%{python_version_nodots python},py%{python_version_nodots python3}
tox.py3 --sitepackages -p auto -o -v

%files
%doc LICENSE *.rst
%_bindir/easy_install
%_bindir/easy_install-%_python_version
%python_sitelibdir/setuptools
%python_sitelibdir/easy_install.*

%files -n python-module-pkg_resources
%doc LICENSE
%python_sitelibdir/pkg_resources
# People write "setuptools" in *.egg-info/requires.txt (or in setup.py's requires)
# even if they use only the pkg_resources part;
# if setuptools-*.egg-info is not present, pkg_resources.load_entry_point() fails
# (for no real reason). Unfortunately, they have nothing better to write there...
# So we fool this mechanism by putting this file even
# if having incomplete setuptools code.
# Our autoreqs will take over the duty of tracking the real dependencies.
# (In future, we could patch their requires.txt.)
%python_sitelibdir/setuptools-%version-*.egg-info

%files docs
%doc docs/*.txt

%files -n python3-module-%mname
%doc LICENSE *.rst
%_bindir/easy_install3
%_bindir/easy_install-%_python3_version
%python3_sitelibdir/__pycache__/*
%python3_sitelibdir/setuptools
%python3_sitelibdir/easy_install.*

%files -n python3-module-pkg_resources
%doc LICENSE
%python3_sitelibdir/pkg_resources
%python3_sitelibdir/setuptools-%version-*.egg-info

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin