Diff:
---
NEWS | 6 ++
bin/cygport.in | 10 ++-
cygclass/meson.cygclass | 7 +-
cygclass/pygtk.cygclass | 127 ---------------------------
cygclass/python-distutils.cygclass | 25 ------
cygclass/python-wheel.cygclass | 49 +++++++++--
cygclass/python.cygclass | 82 -----------------
cygclass/python.org.cygclass | 2 +-
cygclass/python2-distutils.cygclass | 71 ---------------
cygclass/python2-wheel.cygclass | 69 ---------------
cygclass/python2.cygclass | 169 ------------------------------------
cygclass/python3-distutils.cygclass | 2 +-
cygclass/python3.cygclass | 7 +-
cygclass/xvfb.cygclass | 17 +++-
cygport.spec | 2 +-
data/sample.cygport | 2 +-
lib/src_postinst.cygpart | 22 ++++-
meson.build | 2 +-
18 files changed, 105 insertions(+), 566 deletions(-)
diff --git a/NEWS b/NEWS
index 859ff4b5..388d39b1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+0.37.6:
+ * python-wheel: Disable unneeded build isolation
+ * postinstall: Improve stripping of sets of hardlinked files
+ * Drop documentation of python2-only cygclasses
+ * xvfb: Fix potential infinite loop
+
0.37.5:
* python-wheel: Update default PYTHON_WHEEL_VERSIONS
* python-wheel: Restore python_wheel_compile passing options to
bdist_wheel
diff --git a/bin/cygport.in b/bin/cygport.in
index 86df5906..de8fa0df 100755
--- a/bin/cygport.in
+++ b/bin/cygport.in
@@ -61,7 +61,7 @@ source ${_privlibdir}/syntax.cygpart
# The Cygport Reference Manual documents cygport, a utility for creating and
# building software packages for the Cygwin platform.
#
-# |html Copyright © 2006-2025 Cygport authors
+# |html Copyright © 2006-2026 Cygport authors
#
# Permission is granted to copy, distribute and/or modify this manual
# under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -654,6 +654,14 @@ then
fi
fi
+
+# prevent any git commands run by the build from traversing up out of the
+# working directory into the ${topdir}, which contains the cygport file - thus
+# preventing them from seeing a git repository there, if the cygport is under
+# git control, and mistaking it for a git repository containing the project
+# being built.
+export GIT_CEILING_DIRECTORIES+=":${topdir}"
+
################################################################################
#
# Command processing
diff --git a/cygclass/meson.cygclass b/cygclass/meson.cygclass
index 6fc448bc..cd408d67 100644
--- a/cygclass/meson.cygclass
+++ b/cygclass/meson.cygclass
@@ -88,10 +88,13 @@ cygmeson() {
# Flags in CYGMESON_ARGS follow, and therefore override, flags passed by
# default to cygmeson.
#****
- PYTHONUNBUFFERED=1 meson setup --prefix=$(__host_prefix) \
+ PYTHONUNBUFFERED=1 meson setup \
+ --prefix=$(__host_prefix) \
--localstatedir=$(__host_localstatedir) \
--sysconfdir=$(__host_sysconfdir) \
- --buildtype=plain --wrap-mode=nodownload \
+ --reconfigure \
+ --buildtype=plain \
+ --wrap-mode=nodownload \
--auto-features=enabled \
${crossargs} ${CYGMESON_ARGS} "${@}" _build.${CHOST} \
|| error "meson failed"
diff --git a/cygclass/pygtk.cygclass b/cygclass/pygtk.cygclass
index 8bc38a8e..1b95bcb2 100644
--- a/cygclass/pygtk.cygclass
+++ b/cygclass/pygtk.cygclass
@@ -21,133 +21,6 @@
#
################################################################################
-#****h* Cygclasses/pygtk.cygclass
-# SYNOPSIS
-# inherit pygtk
-# DESCRIPTION
-# The PyGTK project provides a series of bindings for the GTK+ and GNOME
-# libraries. APIs are defined in .defs files, from which C binding code
-# is generated with PYGTK_CODEGEN. These bindings allow full-featured
-# GNOME programs to be written in the Python language.
-#
-# This package provides definitions and functions for building PyGTK bindings.
-# NOTE
-# These bindings are limited to both GTK+ 2 and Python 2, both of which are
-# in long-term maintenance mode. For support of GTK+ 3 and/or Python 3,
-# GObject Introspection (python*-gi plus girepository-* packages) must be used
-# instead. Therefore, these bindings are considered obsolete.
-# INHERITS
-# gnome.org.cygclass (unless mate.cygclass has been inherit()ed),
python.cygclass
-#****
-
warning "pygtk.cygclass: pygtk bindings are limited to got gtk+2 and python2
and considered obsolete."
-case ${PN#python-} in
- ${PN})
- # for packages which provide pygtk bindings together with the C
lib.
- pygtk_mod=${PN}
- ;;
- gnome-python|nautilus-python)
- pygtk_mod=${PN/-python}
- ORIG_PN=${PN}
- ;;
- gnome-python-desktop|gnome-python-extras)
- pygtk_mod=${PN/-python-/ }
- ORIG_PN=${PN}
- ;;
- gst0.10)
- pygtk_mod="gstreamer 0.10"
- ORIG_PN="gst-python"
- ;;
- mate*)
- pygtk_mod=${PN#python-}
- ORIG_PN=${ORIG_PN:-${PN}}
- ;;
- *)
- pygtk_mod=${PN#python-}
- ORIG_PN=${ORIG_PN:-py${pygtk_mod%2*}}
- ;;
-esac
-
-inherited mate || inherit gnome.org
inherit python
-
-#****d* pygtk.cygclass/PYGTK_INCLUDEDIR
-# DESCRIPTION
-# Directory containing PyGTK C headers.
-#****
-PYGTK_INCLUDEDIR="/usr/include/pygtk-2.0"
-
-#****d* pygtk.cygclass/PYGTK_LIBDIR
-# DESCRIPTION
-# Installation path for PyGTK bindings.
-#****
-PYGTK_LIBDIR="${PYTHON_SITELIB}/gtk-2.0"
-
-#****d* pygtk.cygclass/PYGTK_DATADIR
-# DESCRIPTION
-# Installation path for *.defs and *-arg-types.py API files.
-#****
-PYGTK_DATADIR="/usr/share/pygtk/2.0"
-
-#****d* pygtk.cygclass/PYGTK_CODEGEN
-# DESCRIPTION
-# Absolute path to the PyGTK C code generator.
-#****
-if check_prog pygobject-codegen-2.0
-then
- export PYGTK_CODEGEN="/usr/bin/pygobject-codegen-2.0"
-fi
-
-#****o* pygtk.cygclass/CATEGORY (pygtk)
-# DEFINITION
-CATEGORY="Python"
-#****
-#****o* pygtk.cygclass/SUMMARY (pygtk)
-# DEFINITION
-SUMMARY="Python ${pygtk_mod} bindings"
-#****
-#****o* pygtk.cygclass/HOMEPAGE (pygtk)
-# DEFINITION
-HOMEPAGE="https://pygobject.readthedocs.io/"
-#****
-
-unset pygtk_mod
-
-#****C* pygtk.cygclass/pygtk_compile
-# SYNOPSIS
-# pygtk_compile [OPTIONS]
-# DESCRIPTION
-# Configures the package with cygconf, passing any arguments it receives,
-# then compiles the package with cygmake.
-#****
-pygtk_compile() {
- if inherited gnome2
- then
- gnome2_configure "${@}"
- else
- cygconf "${@}"
- fi
- cygmake LIBS="-no-undefined ${LIBPYTHON}"
-}
-
-#****o* pygtk.cygclass/src_compile (pygtk)
-# DEFINITION
-src_compile() {
- cd ${S}
- if [ -d m4 ]
- then
- ACLOCAL_FLAGS='-I m4'
- fi
- if inherited gnome2
- then
- gnome2_autoreconf
- else
- cygautoreconf
- fi
- cd ${B}
- pygtk_compile
-}
-#****
-
-readonly -f pygtk_compile
diff --git a/cygclass/python-distutils.cygclass
b/cygclass/python-distutils.cygclass
index 14d4ae65..0a78949d 100644
--- a/cygclass/python-distutils.cygclass
+++ b/cygclass/python-distutils.cygclass
@@ -21,31 +21,6 @@
#
################################################################################
-#****ih* Cygclasses/python-distutils.cygclass
-# DESCRIPTION
-# Deprecated compatibility wrapper for python2-distutils.cygclass.
-# INHERITS
-# python2-distutils.cygclass, python.cygclass
-#****
-
warning "python-distutils.cygclass: deprecated compatibility wrapper for the
python2-distutils cygclass"
inherit python2-distutils python
-
-#****iC* python-distutils.cygclass/python_distutils_compile
-# DESCRIPTION
-# Deprecated compatibility wrapper for python2_distutils_compile.
-#****
-python_distutils_compile() {
- python2_distutils_compile "$@"
-}
-
-#****iI* python-distutils.cygclass/python_distutils_install
-# DESCRIPTION
-# Deprecated compatibility wrapper for python2_distutils_install.
-#****
-python_distutils_install() {
- python2_distutils_install "$@"
-}
-
-readonly -f python_distutils_compile python_distutils_install
diff --git a/cygclass/python-wheel.cygclass b/cygclass/python-wheel.cygclass
index ab96e8a6..d613d961 100644
--- a/cygclass/python-wheel.cygclass
+++ b/cygclass/python-wheel.cygclass
@@ -55,6 +55,8 @@ PYTHON_WHEEL_NAME=${PYTHON_WHEEL_NAME:-${NAME#python*-}}
inherit python.org
+: ${PYTHON_WHEEL_BUILD_METHOD:=pip}
+
#****v* python-wheel.cygclass/PYTHON_WHEEL_VERSIONS
# SYNOPSIS
# PYTHON_WHEEL_VERSIONS="3.5:3.6" # e.g. added to stdlib in 3.7
@@ -65,7 +67,6 @@ inherit python.org
# * all: all supported 3.y versions (currently: 3.8, 3.9, 3.12)
# * future: the default and upcoming 3.y versions (currently: 3.9, 3.12)
# * default: the default 3.y version(s) (currently: 3.9, 3.12)
-# * 2: the default 2.x version (permanently 2.7)
# * 3: the default 3.x version (currently: 3.9)
#
# If defined, this variable must be set before inheriting
python-wheel.cygclass.
@@ -113,6 +114,11 @@ do
check_prog_req pip${ver} python${ver//.}-pip
check_prog_req wheel-${ver} python${ver//.}-wheel
+
+ if [ "${PYTHON_WHEEL_BUILD_METHOD}" = "build" ]
+ then
+ python${ver} -c 'import build' 2>/dev/null || error
"pyproject-build${ver} is required to build this package";
+ fi
done
#****o* python-wheel.cygclass/PKG_NAMES (python-wheel)
@@ -130,10 +136,7 @@ then
for ver in ${PYTHON_WHEEL_VERSIONS//:/ }
do
PKG_NAMES+=" python${ver/.}-${PYTHON_WHEEL_NAME}"
- # this was 2 at the time of the XY-version split,
- # and MUST NOT be updated when defaults change
case ${ver} in
- 2.7) declare -g
python27_${PYTHON_WHEEL_NAME//[-\.]/_}_OBSOLETES="python-${PYTHON_WHEEL_NAME}
python2-${PYTHON_WHEEL_NAME}" ;;
# this is the default 3.x version
3.9)
# If we are making a 3.x package (where x is the default),
@@ -160,6 +163,20 @@ fi
# Any arguments provided will be passed as arguments to 'setup.py
bdist_wheel',
# if that is invoked by the build.
#****
+
+#****iv* python-wheel.cygclass/PYTHON_WHEEL_BUILD_METHOD
+# SYNOPSIS
+# PYTHON_WHEEL_BUILD_METHOD="pip"
+# DESCRIPTION
+# Selects the method used to build a binary wheel:
+# * 'build': Uses pyproject-build (the 'build' module).
+# * 'pip': Uses 'pip wheel'.
+# * 'setuptools': Uses 'setup.py bdist_wheel'.
+# NOTES
+# If you find yourself using this to override cygport's default behaviour,
that
+# is in all likelihood a bug in cygport.
+#****
+
python_wheel_compile() {
local ver
local bdist_args
@@ -179,7 +196,25 @@ python_wheel_compile() {
[ ! -d build/lib ] || find build/lib -delete
if [ ! -f dist/*-py2.py3*-none-any.whl -a ! -f
dist/*py${ver:0:1}-none-any.whl ]
then
- pip${ver} wheel --no-deps -w dist ${bdist_args} . ||
error "pip${ver} wheel failed"
+ case "${PYTHON_WHEEL_BUILD_METHOD}" in
+ "setuptools")
+ # setuptools.launch imports setuptools hooks
regardles of setup.py
+ /usr/bin/python${ver} -msetuptools.launch
setup.py bdist_wheel "${@}" || error "setup.py bdist_wheel failed"
+ ;;
+
+ "pip")
+ pip${ver} --disable-pip-version-check wheel
--no-deps --no-build-isolation -w dist ${bdist_args} . || error "pip${ver}
wheel failed"
+ ;;
+
+ "build")
+ /usr/bin/python${ver} -m build --wheel --outdir
dist --skip-dependency-check --no-isolation . || error "pyproject-build${ver}
failed"
+ ;;
+
+ *)
+ error "unknown PYTHON_WHEEL_BUILD_METHOD:
${PYTHON_WHEEL_BUILD_METHOD}"
+ ;;
+
+ esac
fi
done
}
@@ -236,10 +271,10 @@ python_wheel_install() {
# ENSUREPIP_OPTIONS=install: pipX, pipX.Y, easy_install-X.Y
case ${ver} in
- 2.7|3.9) export ENSUREPIP_OPTIONS="install" ;;
+ 3.9) export ENSUREPIP_OPTIONS="install" ;;
*) export ENSUREPIP_OPTIONS="altinstall" ;;
esac
- pip${ver} install -I dist/${whl} --root ${D} --prefix /usr
--no-compile --no-deps --no-warn-script-location || error "pip${ver} install
failed"
+ pip${ver} --disable-pip-version-check install -I dist/${whl}
--root ${D} --prefix /usr --no-compile --no-deps --no-warn-script-location ||
error "pip${ver} install failed"
done
}
diff --git a/cygclass/python.cygclass b/cygclass/python.cygclass
index 7502fa0e..d11ae0c7 100644
--- a/cygclass/python.cygclass
+++ b/cygclass/python.cygclass
@@ -21,88 +21,6 @@
#
################################################################################
-#****ih* Cygclasses/python.cygclass
-# SYNOPSIS
-# inherit python
-# DESCRIPTION
-# Deprecated compatibility wrapper for python2.cygclass.
-# INHERITS
-# python2.cygclass
-#****
-
warning "python.cygclass: deprecated compatibility wrapper for the python2
cygclass"
inherit python2
-
-#****id* python.cygclass/PYTHON
-# DESCRIPTION
-# Deprecated alias for PYTHON2.
-#****
-PYTHON=${PYTHON2}
-
-#****id* python.cygclass/PYTHON_VERSION
-# DESCRIPTION
-# Deprecated alias for PYTHON2_VERSION.
-#****
-PYTHON_VERSION=${PYTHON2_VERSION}
-
-#****id* python.cygclass/PYTHON_INCLUDEDIR
-# DESCRIPTION
-# Deprecated alias for PYTHON2_INCLUDEDIR.
-#****
-PYTHON_INCLUDEDIR=${PYTHON2_INCLUDEDIR}
-
-#****id* python.cygclass/PYTHON_LIB
-# DESCRIPTION
-# Deprecated alias for PYTHON2_LIB.
-#****
-PYTHON_LIB=${PYTHON2_LIB}
-
-#****id* python.cygclass/PYTHON_SITELIB
-# DESCRIPTION
-# Deprecated alias for PYTHON2_SITELIB.
-#****
-PYTHON_SITELIB=${PYTHON2_SITELIB}
-
-#****id* python.cygclass/LIBPYTHON
-# DESCRIPTION
-# Deprecated alias for LIBPYTHON2
-#****
-LIBPYTHON=${LIBPYTHON2}
-
-#****iI* python.cygclass/pythoninto
-# DESCRIPTION
-# Deprecated alias for python2into.
-#****
-pythoninto() {
- python2into "$@"
-}
-
-#****iI* python.cygclass/dopython
-# DESCRIPTION
-# Deprecated alias for dopython2.
-#****
-dopython() {
- dopython2 "$@"
-}
-
-#****iI* python.cygclass/python_optimize
-# DESCRIPTION
-# Deprecated alias for python2_optimize.
-#****
-python_optimize() {
- python2_optimize "$@"
-}
-
-# obsolete: name may be misleading (*_compile() funcs usually build something)
-python_compile() { python2_optimize ${@} ; }
-
-#****iI* python.cygclass/python_fix_shebang
-# DESCRIPTION
-# Deprecated alias for python2_fix_shebang.
-#****
-python_fix_shebang() {
- python2_fix_shebang "$@"
-}
-
-readonly -f pythoninto dopython python_optimize python_compile
python_fix_shebang
diff --git a/cygclass/python.org.cygclass b/cygclass/python.org.cygclass
index 305759f1..6a6f5159 100644
--- a/cygclass/python.org.cygclass
+++ b/cygclass/python.org.cygclass
@@ -35,7 +35,7 @@
# If PN does not match the name of the original source tarball,
# define ORIG_PN before inherit()ing.
# INHERITED BY
-# python-wheel.cygclass, python2-distutils.cygclass,
python3-distutils.cygclass
+# python-wheel.cygclass, python3-distutils.cygclass
#****
PYTHON_ORG_NAME=${ORIG_PN:-${PN}}
diff --git a/cygclass/python2-distutils.cygclass
b/cygclass/python2-distutils.cygclass
index c20f6834..c193ce94 100644
--- a/cygclass/python2-distutils.cygclass
+++ b/cygclass/python2-distutils.cygclass
@@ -23,74 +23,3 @@
warning "python2-distutils.cygclass: python distutils is deprecated. Please
migrate to the python-wheel cygclass."
error "python2-distutils.cyclass: python2 was sunsetted on 1 January, 2020.
Please use python3 instead."
-
-#****h* Cygclasses/python2-distutils.cygclass
-# DESCRIPTION
-# Distutils is the most common method for building and installing Python
-# libraries and programs. The build is defined by a setup.py file in the
-# top source directory, which controls the installation of files and the
-# building of C Python extensions. Many such packages are hosted on the
-# Python Package Index (PyPI, previously known as Cheeseshop).
-#
-# This cygclass handles the building of Python 2.x distutils-based packages.
-# INHERITS
-# python.org.cygclass, python2.cygclass
-# REQUIRES
-# python2
-#****
-case "${PN}" in
-python-*) ORIG_PN=${ORIG_PN:-${PN#python-}} ;;
-python2-*) ORIG_PN=${ORIG_PN:-${PN#python2-}} ;;
-esac
-
-inherit python.org python2
-
-#****C* python2-distutils.cygclass/python2_distutils_compile
-# SYNOPSIS
-# python2_distutils_compile [OPTIONS]
-# DESCRIPTION
-# Runs the setup.py 'build' command, to which any arguments are passed.
-#****
-python2_distutils_compile() {
- if [ ! -e setup.py ]
- then
- error "No Python Distutils module detected"
- fi
-
- ${PYTHON2} setup.py build "${@}" || error "setup.py build failed"
-}
-
-#****I* python2-distutils.cygclass/python2_distutils_install
-# SYNOPSIS
-# python2_distutils_install [OPTIONS]
-# DESCRIPTION
-# Runs the setup.py 'install' phase, setting the root argument to install
-# into $D. All arguments are passed to the setup.py 'install' command.
-#****
-python2_distutils_install() {
- if [ ! -e setup.py ]
- then
- error "No Python Distutils module detected"
- fi
-
- ${PYTHON2} setup.py "${@}" install --no-compile --root=${D} || error
"setup.py install failed"
-}
-
-#****o* python2-distutils.cygclass/src_compile (python2-distutils)
-# DEFINITION
-src_compile() {
- lndirs
- cd ${B}
- python2_distutils_compile
-}
-#****
-
-#****o* python2-distutils.cygclass/src_install (python2-distutils)
-# DEFINITION
-src_install() {
- cd ${B}
- python2_distutils_install
-}
-#****
-
-readonly -f python2_distutils_compile python2_distutils_install
diff --git a/cygclass/python2-wheel.cygclass b/cygclass/python2-wheel.cygclass
index 8d3e32e9..77ad8415 100644
--- a/cygclass/python2-wheel.cygclass
+++ b/cygclass/python2-wheel.cygclass
@@ -21,73 +21,4 @@
#
################################################################################
-#****h* Cygclasses/python2-wheel.cygclass
-# DESCRIPTION
-# Wheels are the new standard for installing Python libraries and programs.
-# The build is defined by a setup.py file in the top source directory, which
-# controls the installation of files and the building of C Python extensions.
-# Many such packages are hosted on the Python Package Index (PyPI).
-#
-# This cygclass handles the building of wheel-based Python 2 packages, for
-# use by packages which do not yet support Python 3, or for backport module
-# packages which are not needed with Python 3. Python module packages which
-# support both Python 2 and 3 should use python-wheel.cygclass instead.
-# EXAMPLE
-# inherit python2-wheel
-#
-# NAME="python-futures"
-# VERSION=3.1.1
-# RELEASE=1
-# CATEGORY="Python"
-# SUMMARY="Backport of Python concurrent.futures to 2.7"
-# DESCRIPTION="The concurrent.futures module provides a high-level interface
-# for asynchronously executing callables. This module is a backport for
-# Python 2.7."
-#
-# ARCH=noarch
-# INHERITS
-# python2.cygclass, python-wheel.cygclass
-# REQUIRES
-# python2, python2-pip
-#****
-
error "python2-wheel.cyclass: python2 was sunsetted on 1 January, 2020.
Please use python3 instead."
-
-inherit python2
-PYTHON_WHEEL_VERSIONS=${PYTHON2_VERSION}
-inherit python-wheel
-
-#****C* python2-wheel.cygclass/python2_wheel_compile
-# SYNOPSIS
-# python2_wheel_compile [OPTIONS]
-# DESCRIPTION
-# Runs the setup.py 'bdist_wheel' command, to which any arguments are passed.
-#****
-python2_wheel_compile() { python_wheel_compile "${@}" ; }
-
-#****I* python2-wheel.cygclass/python2_wheel_install
-# SYNOPSIS
-# python2_wheel_install [OPTIONS]
-# DESCRIPTION
-# Installs the previously built wheel into $D with 'pip2 install'.
-#****
-python2_wheel_install() { python_wheel_install ; }
-
-#****o* python2-wheel.cygclass/src_compile (python2-wheel)
-# DEFINITION
-src_compile() {
- lndirs
- cd ${B}
- python2_wheel_compile
-}
-#****
-
-#****o* python2-wheel.cygclass/src_install (python2-wheel)
-# DEFINITION
-src_install() {
- cd ${B}
- python2_wheel_install
-}
-#****
-
-readonly -f python2_wheel_compile python2_wheel_install
diff --git a/cygclass/python2.cygclass b/cygclass/python2.cygclass
index 0052689f..7c1081cb 100644
--- a/cygclass/python2.cygclass
+++ b/cygclass/python2.cygclass
@@ -21,173 +21,4 @@
#
################################################################################
-#****h* Cygclasses/python2.cygclass
-# SYNOPSIS
-# inherit python2
-# DESCRIPTION
-# Python is a general-purpose, interpreted programming language used in a
-# wide variety of software. It comes with a large standard library, and is
-# easily extendible with modules written in Python and/or C/C++. Programs
-# can also embed a Python interpreter for use with their own extensions.
-#
-# This cygclass provides definitions and some install helpers which can be
used
-# by any Python-based package. Python modules and programs are built in a
-# number of ways, so this cygclass does not provide any build functions. The
-# two most common build systems for Python packages are Distutils and
autotools.
-# NOTE
-# python2.cygclass is for the 2.x versions of CPython. For the 3.x versions,
-# see python3.cygclass.
-# INHERITED BY
-# python-wheel.cygclass, python2-distutils.cygclass, pygtk.cygclass
-# REQUIRES
-# python2
-#****
-
error "python2.cyclass: python2 was sunsetted on 1 January, 2020. Please use
python3 instead."
-
-# cross-compiling is not (yet?) supported
-__cross_compiling_error
-
-check_prog_req python2
-
-#****d* python2.cygclass/PYTHON2
-# DESCRIPTION
-# Absolute path to the Python interpreter.
-#****
-PYTHON2=/usr/bin/python2
-
-#****d* python2.cygclass/PYTHON2_VERSION
-# DESCRIPTION
-# The major.minor version of the current Python interpreter.
-#****
-PYTHON2_VERSION=$(${PYTHON2} -c 'from distutils.sysconfig import * ; print
get_python_version();')
-
-#****d* python2.cygclass/PYTHON2_INCLUDEDIR
-# DESCRIPTION
-# Path containing the Python C library headers.
-#****
-PYTHON2_INCLUDEDIR=$(${PYTHON2} -c 'from distutils.sysconfig import * ; print
get_python_inc();')
-
-#****d* python2.cygclass/PYTHON2_LIB
-# DESCRIPTION
-# Path containing the Python standard library.
-# NOTE
-# Never install third-party extensions into PYTHON2_LIB; use PYTHON2_SITELIB
instead.
-#****
-PYTHON2_LIB=$(${PYTHON2} -c 'from distutils.sysconfig import * ; print
get_python_lib(0,1);')
-
-#****d* python2.cygclass/PYTHON2_SITELIB
-# DESCRIPTION
-# Installation path for all Python extension modules.
-#****
-PYTHON2_SITELIB=$(${PYTHON2} -c 'from distutils.sysconfig import * ; print
get_python_lib(0,0);')
-
-#****d* python2.cygclass/LIBPYTHON2
-# DESCRIPTION
-# Link flags for the Python C library. This definition must be properly
quoted.
-#****
-LIBPYTHON2="-L${PYTHON2_LIB}/config -lpython${PYTHON2_VERSION}"
-
-#****I* python2.cygclass/python2into
-# SYNOPSIS
-# python2into SUBDIRECTORY
-# DESCRIPTION
-# Subdirectory of PYTHON2_SITELIB into which dopython2 should install. This
is
-# usually unnecessary.
-#****
-python2into() {
- if (( $# != 1 ))
- then
- error "python2into accepts exactly one argument";
- fi
-
- case ${1} in
- /*) error "python2into argument should be only a subdirectory" ;;
- esac
-
- _python2into_dir=${1};
-}
-
-#****I* python2.cygclass/dopython2
-# SYNOPSIS
-# [python2into SUBDIRECTORY]
-# dopython2 MODULE1 [MODULE2] ...
-# DESCRIPTION
-# Installs the given Python module(s) (.py or .dll) into PYTHON2_SITELIB
under $D,
-# or a subdirectory thereof if python2into was previously called.
-#****
-dopython2() {
- local pydir
- local i
- local mode
-
- if defined _python2into_dir
- then
- pydir=${PYTHON2_SITELIB}/${_python2into_dir}
- else
- pydir=${PYTHON2_SITELIB}
- fi
-
- dodir ${pydir}
-
- for i
- do
- if [ ! -e ${i} ]
- then
- error "dopython2: ${i}: file not found"
- fi
-
- case ${i} in
- *.dll|*.la) mode=0755 ;;
- *) mode=0644 ;;
- esac
-
- __doinstall ${mode} ${i} ${pydir} || error "dopython2 ${i}
failed"
- done
-}
-
-#****I* python2.cygclass/python2_optimize
-# SYNOPSIS
-# python2_optimize DIRECTORY [DIRECTORY] ...
-# DESCRIPTION
-# Bytecode-compile all Python modules found in the given directories under $D.
-# NOTE
-# Python modules installed with distutils_install are automatically compiled,
-# as are those installed by automake-based packages *if* they have been
declared
-# as _PYTHON files (in which case a py-compile script will be present in $S).
-# Some automake-based packages mistakenly declare these as _DATA instead, in
-# which case either the Makefile.am must be patched or this function called
-# after cyginstall.
-#****
-python2_optimize() {
- local pyd
-
- for pyd
- do
- if [ ! -d ${D}${pyd} ]
- then
- error "directory ${pyd} does not exist"
- fi
-
- inform "Compiling ${pyd}..."
- ${PYTHON2} ${PYTHON2_LIB}/compileall.py -f -q -d ${pyd}
${D}${pyd}
- ${PYTHON2} -O ${PYTHON2_LIB}/compileall.py -f -q -d ${pyd}
${D}${pyd}
- done
-}
-
-#****I* python2.cygclass/python2_fix_shebang
-# SYNOPSIS
-# python2_fix_shebang SCRIPT [SCRIPT ...]
-# DESCRIPTION
-# Fixes the designated interpreter of SCRIPT to PYTHON2. This would be
necessary
-# if the original uses an incorrect path (e.g. /usr/local/bin) or an
-# incorrectly versioned binary. SCRIPT need not be prefixed by $D.
-#****
-python2_fix_shebang() {
- for f
- do
- __fix_shebang ${PYTHON2} ${D}/${f#${D}}
- done
-}
-
-readonly -f python2into dopython2 python2_optimize python2_fix_shebang
diff --git a/cygclass/python3-distutils.cygclass
b/cygclass/python3-distutils.cygclass
index b74390fc..57df1787 100644
--- a/cygclass/python3-distutils.cygclass
+++ b/cygclass/python3-distutils.cygclass
@@ -25,7 +25,7 @@ warning "python3-distutils.cygclass: python distutils is
deprecated. Please migr
#****h* Cygclasses/python3-distutils.cygclass
# DESCRIPTION
-# Distutils is the most common method for building and installing Python
+# Distutils is a deprecated method for building and installing Python
# libraries and programs. The build is defined by a setup.py file in the
# top source directory, which controls the installation of files and the
# building of C Python extensions. Many such packages are hosted on the
diff --git a/cygclass/python3.cygclass b/cygclass/python3.cygclass
index 168a39fe..aaaf8361 100644
--- a/cygclass/python3.cygclass
+++ b/cygclass/python3.cygclass
@@ -30,17 +30,12 @@
# easily extendible with modules written in Python and/or C/C++. Programs
# can also embed a Python interpreter for use with their own extensions.
#
-# The new 3.x versions of Python are incompatible with the widely used 2.x
-# versions, so they are designed to be installed in parallel as separate
-# interpreters.
-#
# This cygclass provides definitions and some install helpers which can be
used
# by any Python3-based package. Python3 modules and programs are built in a
# number of ways, so this cygclass does not provide any build functions. The
# two most common build systems for Python3 packages are Distutils and
autotools.
# NOTE
-# python3.cygclass is for the 3.x versions of Python; for the 2.x versions,
-# see python2.cygclass.
+# python3.cygclass is for the 3.x versions of Python.
# INHERITED BY
# python-wheel.cygclass
# REQUIRES
diff --git a/cygclass/xvfb.cygclass b/cygclass/xvfb.cygclass
index f39dcbba..5ece3952 100644
--- a/cygclass/xvfb.cygclass
+++ b/cygclass/xvfb.cygclass
@@ -64,7 +64,7 @@ xvfb_run() {
then
xvfb_display=$DISPLAY
else
- for ((n=1; ; n++))
+ for ((n=1; n<64 ; n++))
do
if [ ! -e /tmp/.X11-unix/X${n} -a ! -e /tmp/.X${n}-lock
]
then
@@ -72,6 +72,11 @@ xvfb_run() {
Xorg $xvfb_display -config cygport-xvfb.conf
-nolisten tcp -noreset &> /dev/null &
xvfb_pid=$!
xvfb_sock="/tmp/.X${n}-lock
/tmp/.X11-unix/X${n}"
+
+ # "wait for" the X server to become ready to
+ # accept connections
+ sleep 1
+
if xmodmap -display $xvfb_display &> /dev/null
then
export DISPLAY=${xvfb_display}
@@ -84,6 +89,12 @@ xvfb_run() {
fi
fi
done
+
+ if ! defined DISPLAY
+ then
+ error "could not start an X server on a free display
number"
+ fi
+
fi
# avoid the most common fork failures
@@ -108,11 +119,15 @@ xvfb_run() {
# now run the task
"$@"
+ local status=$?
# cleanup
/bin/kill $xvfb_pid $dbus_pid $gamin_pid &> /dev/null || true
/bin/kill -s KILL $xvfb_pid $dbus_pid $gamin_pid &> /dev/null || true
rm -f $xvfb_sock $dbus_sock $gamin_sock
+
+ # propagate task exit code
+ return $status
}
readonly -f xvfb_run
diff --git a/cygport.spec b/cygport.spec
index 6ba56545..1bc51f00 100644
--- a/cygport.spec
+++ b/cygport.spec
@@ -1,7 +1,7 @@
%define debug_package %{nil}
Name: cygport
-Version: 0.37.5
+Version: 0.37.6
Release: 1%{?dist}
Summary: Cygwin package building tool
diff --git a/data/sample.cygport b/data/sample.cygport
index 08ae272d..5e540ea5 100644
--- a/data/sample.cygport
+++ b/data/sample.cygport
@@ -1,7 +1,7 @@
inherit meson
NAME="cygport"
-VERSION=0.37.5
+VERSION=0.37.6
RELEASE=1
CATEGORY="Devel"
SUMMARY="Cygwin source packaging tool"
diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 91e5918a..89da3664 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -1130,6 +1130,26 @@ __prepstrip_one() {
fi
}
+
+# avoid simultaneously running prepstrip_one on multiple names hardlinked to
the
+# same file
+__prepstrip_one_locked()
+{
+ local exe=$1;
+ local __fd;
+
+ # open the file with a dynamically allocated fd
+ : {__fd}<${exe}
+
+ # lock file
+ flock ${__fd}
+
+ __prepstrip_one "${@}"
+
+ # close fd, releasing lock
+ {__fd}<&-
+}
+
__prepstrip() {
local exe;
@@ -1175,7 +1195,7 @@ __prepstrip() {
done
((++ord))
oxt=$(printf "%05d" "${ord}")
- __prepstrip_one "${exe}" "${oxt}" &
+ __prepstrip_one_locked "${exe}" "${oxt}" &
echo " ... ${exe} ==> .dbgsrc.out.${oxt}" >> ${T}/.dbgsrc.dbg
done < <(find * -type f ! -name '*.dll.a' ! -name '*.lib' \
-a \( -name '*.a' -o -name '*.o' -o -name '*.dll' -o
-name '*.exe' -o -name '*.so' -o -name '*.so.*' -o -name '*.oct' -o -name
'*.mex' -o -name '*.cmxs' \) -print0 \
diff --git a/meson.build b/meson.build
index f991f22c..a6cf2008 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('cygport',
- version: '0.37.5')
+ version: '0.37.6')
bindir = join_paths(get_option('prefix'), get_option('bindir'))
datadir = join_paths(get_option('prefix'), get_option('datadir'))
[cygport - the Cygwin packaging tool] branch master, updated. 0.37.6
Jon Turney via Cygwin-apps-cvs Fri, 02 Jan 2026 09:02:50 -0800
