Skip to content

Commit

Permalink
alvistack/v74.1.2
Browse files Browse the repository at this point in the history
    git clean -xdf
    tar zcvf ../python-setuptools_74.1.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-setuptools.spec ../python-setuptools_74.1.2-1.spec
    cp ../python-setuptools*74.1.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/pypa-setuptools-74.1.2/
    rm -rf ../python*-setuptools*74.1.2*.* ../python*-pkg-resources_74.1.2*.*

See pypa#3234 (comment)
See https://salsa.debian.org/cpython-team/python3/-/blob/python3.10/debian/patches/distutils-install-layout.diff
See https://salsa.debian.org/cpython-team/python3/-/blob/python3.10/debian/patches/sysconfig-debian-schemes.diff

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
  • Loading branch information
hswong3i committed Sep 4, 2024
1 parent c484f9e commit 0d4d26d
Show file tree
Hide file tree
Showing 25 changed files with 1,581 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax: glob
# See https://blog.jaraco.com/skeleton/#ignoring-artifacts before modifying.
bin
build
dist
docs/build
include
lib
distribute.egg-info
setuptools.egg-info
setuptools/tests/bdist_wheel_testdata/*/*.egg-info/
.coverage
.eggs
.tox
.venv
*.egg
*.py[cod]
*.swp
*~
.hg*
.cache
.pytest_cache/
.mypy_cache/
.pybuild
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ recursive-include tests *.py
recursive-include setuptools/tests *.html
recursive-include docs *.py *.txt *.rst *.conf *.css *.css_t Makefile indexsidebar.html
recursive-include setuptools/_vendor *
recursive-include setuptools/_distutils/_vendor *
recursive-include pkg_resources *.py *.txt
recursive-include pkg_resources/tests/data *
recursive-include tools *
Expand Down
136 changes: 136 additions & 0 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
Metadata-Version: 2.1
Name: setuptools
Version: 73.0.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Author-email: Python Packaging Authority <distutils-sig@python.org>
Project-URL: Source, https://github.com/pypa/setuptools
Project-URL: Documentation, https://setuptools.pypa.io/
Project-URL: Changelog, https://setuptools.pypa.io/en/stable/history.html
Keywords: CPAN PyPI distutils eggs package management
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
Requires-Dist: pytest-checkdocs>=2.4; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-mypy; extra == "test"
Requires-Dist: pytest-enabler>=2.2; extra == "test"
Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "test"
Requires-Dist: virtualenv>=13.0.0; extra == "test"
Requires-Dist: wheel>=0.44.0; extra == "test"
Requires-Dist: pip>=19.1; extra == "test"
Requires-Dist: packaging>=23.2; extra == "test"
Requires-Dist: jaraco.envs>=2.2; extra == "test"
Requires-Dist: pytest-xdist>=3; extra == "test"
Requires-Dist: jaraco.path>=3.2.0; extra == "test"
Requires-Dist: build[virtualenv]>=1.0.3; extra == "test"
Requires-Dist: filelock>=3.4.0; extra == "test"
Requires-Dist: ini2toml[lite]>=0.14; extra == "test"
Requires-Dist: tomli-w>=1.0.0; extra == "test"
Requires-Dist: pytest-timeout; extra == "test"
Requires-Dist: pytest-perf; sys_platform != "cygwin" and extra == "test"
Requires-Dist: jaraco.develop>=7.21; (python_version >= "3.9" and sys_platform != "cygwin") and extra == "test"
Requires-Dist: pytest-home>=0.5; extra == "test"
Requires-Dist: mypy==1.11.*; extra == "test"
Requires-Dist: tomli; extra == "test"
Requires-Dist: importlib_metadata; extra == "test"
Requires-Dist: pytest-subprocess; extra == "test"
Requires-Dist: pytest-ruff>=0.3.2; sys_platform != "cygwin" and extra == "test"
Requires-Dist: pyproject-hooks!=1.1; extra == "test"
Requires-Dist: jaraco.test; extra == "test"
Requires-Dist: pytest-ruff<0.4; platform_system == "Windows" and extra == "test"
Provides-Extra: doc
Requires-Dist: sphinx>=3.5; extra == "doc"
Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
Requires-Dist: rst.linker>=1.9; extra == "doc"
Requires-Dist: furo; extra == "doc"
Requires-Dist: sphinx-lint; extra == "doc"
Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
Requires-Dist: pygments-github-lexers==0.0.5; extra == "doc"
Requires-Dist: sphinx-favicon; extra == "doc"
Requires-Dist: sphinx-inline-tabs; extra == "doc"
Requires-Dist: sphinx-reredirects; extra == "doc"
Requires-Dist: sphinxcontrib-towncrier; extra == "doc"
Requires-Dist: sphinx-notfound-page<2,>=1; extra == "doc"
Requires-Dist: pyproject-hooks!=1.1; extra == "doc"
Requires-Dist: towncrier<24.7; extra == "doc"
Provides-Extra: ssl
Provides-Extra: certs
Provides-Extra: core
Requires-Dist: packaging>=24; extra == "core"
Requires-Dist: more_itertools>=8.8; extra == "core"
Requires-Dist: jaraco.text>=3.7; extra == "core"
Requires-Dist: importlib_resources>=5.10.2; python_version < "3.9" and extra == "core"
Requires-Dist: importlib_metadata>=6; python_version < "3.10" and extra == "core"
Requires-Dist: tomli>=2.0.1; python_version < "3.11" and extra == "core"
Requires-Dist: wheel>=0.43.0; extra == "core"
Requires-Dist: platformdirs>=2.6.2; extra == "core"

.. |pypi-version| image:: https://img.shields.io/pypi/v/setuptools.svg
:target: https://pypi.org/project/setuptools

.. |py-version| image:: https://img.shields.io/pypi/pyversions/setuptools.svg

.. |test-badge| image:: https://github.com/pypa/setuptools/actions/workflows/main.yml/badge.svg
:target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22tests%22
:alt: tests

.. |ruff-badge| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: Ruff

.. |docs-badge| image:: https://img.shields.io/readthedocs/setuptools/latest.svg
:target: https://setuptools.pypa.io

.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2024-informational
:target: https://blog.jaraco.com/skeleton

.. |codecov-badge| image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
:target: https://codecov.io/gh/pypa/setuptools

.. |tidelift-badge| image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
:target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme

.. |discord-badge| image:: https://img.shields.io/discord/803025117553754132
:target: https://discord.com/channels/803025117553754132/815945031150993468
:alt: Discord

|pypi-version| |py-version| |test-badge| |ruff-badge| |docs-badge| |skeleton-badge| |codecov-badge| |discord-badge|

See the `Quickstart <https://setuptools.pypa.io/en/latest/userguide/quickstart.html>`_
and the `User's Guide <https://setuptools.pypa.io/en/latest/userguide/>`_ for
instructions on how to use Setuptools.

Questions and comments should be directed to `GitHub Discussions
<https://github.com/pypa/setuptools/discussions>`_.
Bug reports and especially tested patches may be
submitted directly to the `bug tracker
<https://github.com/pypa/setuptools/issues>`_.


Code of Conduct
===============

Everyone interacting in the setuptools project's codebases, issue trackers,
chat rooms, and fora is expected to follow the
`PSF Code of Conduct <https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md>`_.


For Enterprise
==============

Available as part of the Tidelift Subscription.

Setuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.

`Learn more <https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=referral&utm_campaign=github>`_.
136 changes: 136 additions & 0 deletions _distutils_system_mod.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
"""
Apply Debian-specific patches to distutils commands and sysconfig.
Extracts the customized behavior from patches as reported
in pypa/distutils#2 and applies those customizations (except
for scheme definitions) to those commands.
Place this module somewhere in sys.path to take effect.
"""

import os
import sys
import sysconfig

import distutils.sysconfig
import distutils.command.install as orig_install
import distutils.command.install_egg_info as orig_install_egg_info
from distutils.command.install_egg_info import (
to_filename,
safe_name,
safe_version,
)
from distutils.errors import DistutilsOptionError


class install(orig_install.install):
user_options = list(orig_install.install.user_options) + [
('install-layout=', None,
"installation layout to choose (known values: deb, unix)"),
]

def initialize_options(self):
super().initialize_options()
self.prefix_option = None
self.install_layout = None

def finalize_unix(self):
self.prefix_option = self.prefix
super().finalize_unix()
if self.install_layout:
if self.install_layout.lower() in ['deb']:
self.select_scheme("deb_system")
elif self.install_layout.lower() in ['unix']:
self.select_scheme("posix_prefix")
else:
raise DistutilsOptionError(
"unknown value for --install-layout")
elif ((self.prefix_option and
os.path.normpath(self.prefix) != '/usr/local')
or sys.base_prefix != sys.prefix
or 'PYTHONUSERBASE' in os.environ
or 'VIRTUAL_ENV' in os.environ
or 'real_prefix' in sys.__dict__):
self.select_scheme("posix_prefix")
else:
if os.path.normpath(self.prefix) == '/usr/local':
self.prefix = self.exec_prefix = '/usr'
self.install_base = self.install_platbase = '/usr'
self.select_scheme("posix_local")


class install_egg_info(orig_install_egg_info.install_egg_info):
user_options = list(orig_install_egg_info.install_egg_info.user_options) + [
('install-layout', None, "custom installation layout"),
]

def initialize_options(self):
super().initialize_options()
self.prefix_option = None
self.install_layout = None

def finalize_options(self):
self.set_undefined_options('install',('install_layout','install_layout'))
self.set_undefined_options('install',('prefix_option','prefix_option'))
super().finalize_options()

@property
def basename(self):
if self.install_layout:
if not self.install_layout.lower() in ['deb', 'unix']:
raise DistutilsOptionError(
"unknown value for --install-layout")
no_pyver = (self.install_layout.lower() == 'deb')
elif self.prefix_option:
no_pyver = False
else:
no_pyver = True
if no_pyver:
basename = "%s-%s.egg-info" % (
to_filename(safe_name(self.distribution.get_name())),
to_filename(safe_version(self.distribution.get_version()))
)
else:
basename = "%s-%s-py%d.%d.egg-info" % (
to_filename(safe_name(self.distribution.get_name())),
to_filename(safe_version(self.distribution.get_version())),
*sys.version_info[:2]
)
return basename


def _posix_lib(standard_lib, libpython, early_prefix, prefix):
is_default_prefix = not early_prefix or os.path.normpath(early_prefix) in ('/usr', '/usr/local')
if standard_lib:
return libpython
elif (is_default_prefix and
'PYTHONUSERBASE' not in os.environ and
'VIRTUAL_ENV' not in os.environ and
'real_prefix' not in sys.__dict__ and
sys.prefix == sys.base_prefix):
return os.path.join(prefix, "lib", "python3", "dist-packages")
else:
return os.path.join(libpython, "site-packages")


def extend_schemes():
sysconfig._INSTALL_SCHEMES.setdefault(
'deb_system',
dict(
purelib='{base}/lib/python3/dist-packages',
platlib='{platbase}/lib/python3/dist-packages',
headers='{base}/include/python{py_version_short}/{dist_name}',
scripts='{base}/bin',
data='{base}',
),
)


def apply_customizations():
orig_install.install = install
orig_install_egg_info.install_egg_info = install_egg_info
distutils.sysconfig._posix_lib = _posix_lib
extend_schemes()


apply_customizations()
8 changes: 8 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.substvars
*debhelper*
.debhelper
files
python3-pkg-resources
python3-setuptools
python3-setuptools-whl
tmp
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python-setuptools (100:74.1.2-1) UNRELEASED; urgency=medium

* https://github.com/pypa/setuptools/releases/tag/v74.1.2

-- Wong Hoi Sing Edison <hswong3i@pantarei-design.com> Wed, 04 Sep 2024 17:39:12 +0800
57 changes: 57 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Source: python-setuptools
Section: python
Priority: optional
Standards-Version: 4.5.0
Maintainer: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Homepage: https://github.com/pypa/setuptools/tags
Vcs-Browser: https://github.com/alvistack/pypa-setuptools
Vcs-Git: https://github.com/alvistack/pypa-setuptools.git
Build-Depends:
debhelper,
debhelper-compat (= 10),
dh-python,
fdupes,
python3-dev,
python3-wheel,

Package: python3-pkg-resources
Architecture: all
Description: Package Discovery and Resource Access using pkg_resources
The pkg_resources module 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.
Depends:
${misc:Depends},
${shlibs:Depends},
${python3:Depends},

Package: python3-setuptools
Architecture: all
Description: Download, build, install, upgrade, and uninstall Python packages
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.
Depends:
${misc:Depends},
${shlibs:Depends},
${python3:Depends},
python3,
python3-pkg-resources (= ${source:Version}),

Package: python3-setuptools-whl
Architecture: all
Description: Python Distutils Enhancements (wheel package)
This is the support package for the PEP 427 wheel version of the package,
required for using setuptools inside a virtual environment.
Depends:
${misc:Depends},
${shlibs:Depends},
${python3:Depends},
Breaks:
python-pip-whl (<< 21.3.1+dfsg-2~),
Replaces:
python-pip-whl (<< 21.3.1+dfsg-2~),
Loading

0 comments on commit 0d4d26d

Please sign in to comment.