Diff:
---
 NEWS                                               |  2 ++
 cygclass/python.org.cygclass                       |  3 +++
 cygport.spec                                       |  2 +-
 data/sample.cygport                                |  2 +-
 lib/pkg_pkg.cygpart                                |  7 ++---
 lib/src_fetch.cygpart                              |  2 +-
 lib/syntax.cygpart                                 | 16 +++++++++++
 meson.build                                        |  2 +-
 testsuite/python/meson.build                       |  2 ++
 .../python-license-expression-30.4.3-1-src.hint    | 10 +++++++
 ...python3-license-expression-30.4.3-1-noarch.hint |  6 +++++
 ...ython39-license-expression-30.4.3-1-noarch.hint |  8 ++++++
 .../python-license-expression.cygport              | 24 +++++++++++++++++
 .../normalization/python-license-expression.list   | 31 ++++++++++++++++++++++
 testsuite/python/normalization/vars                |  4 +++
 15 files changed, 114 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index 9ce6ab68..cf8d1b46 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+0.37.2:
+       * python.org: Also set SRC_DIR appropriately
 0.37.1:
        * python.org: Form PyPI URLs using PEP 625 project name normalization
        * ocaml-dune: Allow customized arguments to dune install
diff --git a/cygclass/python.org.cygclass b/cygclass/python.org.cygclass
index 402e76e7..305759f1 100644
--- a/cygclass/python.org.cygclass
+++ b/cygclass/python.org.cygclass
@@ -47,12 +47,15 @@ PYTHON_ORG_NAME=${ORIG_PN:-${PN}}
 #  By default, the project name is normalized according to PEP 625 rules (which
 #  transforms all uppercase letters to lowercase, and replaces all contiguous
 #  runs of ._- characters with a single underscore).
+#
+#  This normalized name is then used to construct HOMEPAGE, SRC_URI and 
SRC_DIR.
 #****
 
 if [ ! -v PYPI_NO_NORMALIZE ]
 then
        PYTHON_ORG_NAME=$(echo "${PYTHON_ORG_NAME}" | tr -s '._-' '_')
        PYTHON_ORG_NAME=${PYTHON_ORG_NAME,,}
+       SRC_DIR=${PYTHON_ORG_NAME}-${PV}
 fi
 
 #****o* python.org.cygclass/HOMEPAGE (python.org)
diff --git a/cygport.spec b/cygport.spec
index 49597364..af3f7a21 100644
--- a/cygport.spec
+++ b/cygport.spec
@@ -1,7 +1,7 @@
 %define debug_package %{nil}
 
 Name:           cygport
-Version:        0.37.1
+Version:        0.37.2
 Release:        1%{?dist}
 Summary:        Cygwin package building tool
 
diff --git a/data/sample.cygport b/data/sample.cygport
index 7cc03a1d..ce9c9eb5 100644
--- a/data/sample.cygport
+++ b/data/sample.cygport
@@ -1,7 +1,7 @@
 inherit meson
 
 NAME="cygport"
-VERSION=0.37.1
+VERSION=0.37.2
 RELEASE=1
 CATEGORY="Devel"
 SUMMARY="Cygwin source packaging tool"
diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index ccf432a6..714213b3 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -464,9 +464,10 @@ __pkg_diff() {
 
 #****v* Packaging/DIFF_EXCLUDES
 #  DESCRIPTION
-#  A list of file names, directory names, or glob patterns in S which will
-#  be excluded when creating the .src.patch file.  This should be used for
-#  files automatically generated in S to avoid polluting the patch.
+#  A list of file names, directory names, or glob patterns. Files or 
directories
+#  in S with matching basenames will be excluded when creating the .src.patch
+#  file.  This should be used for files automatically generated in S to avoid
+#  polluting the patch.
 #  NOTE
 #  Files generated by various buildsystem infrastructures, such as autoconf,
 #  automake, gettext, and libtool are already excluded automatically and
diff --git a/lib/src_fetch.cygpart b/lib/src_fetch.cygpart
index 5d784b38..fcc87163 100644
--- a/lib/src_fetch.cygpart
+++ b/lib/src_fetch.cygpart
@@ -205,7 +205,7 @@ __src_fetch() {
        done
 }
 
-#****v* Downloading//VCS_COMPRESSION_EXT
+#****v* Downloading/VCS_COMPRESSION_EXT
 #  SYNOPSIS
 #  VCS_COMPRESSION_EXT="bz2"
 #  DESCRIPTION
diff --git a/lib/syntax.cygpart b/lib/syntax.cygpart
index 8608e0c9..1dc3ad2d 100644
--- a/lib/syntax.cygpart
+++ b/lib/syntax.cygpart
@@ -312,20 +312,36 @@ __target_is_embedded() {
 #  the upstream name is to append a version "slot" where multiple versions of
 #  a package are completely parallel installable (e.g. gtk1.2 and gtk2.0, both
 #  from gtk+).  In this case, define ORIG_PN to the upstream package name.
+#
 #  NOTE
 #  See https://cygwin.com/packaging-package-files.html#naming for more details
 #  of the policy on package naming and versioning.
+#
+#  NOTE
+#  This variable should be assigned a literal value, since cygport expects to
+#  be able to extract the line defining NAME from the file and evaluate it on
+#  its own.
 #****
 #****v* Globals/VERSION
 #  DESCRIPTION
 #  The upstream package version number.  VERSION must begin with a digit 0-9, 
and
 #  subsequent characters can be a digit, letter, dot, plus-sign or underscore.
+#
+#  NOTE
+#  This variable should be assigned a literal value, since cygport expects to
+#  be able to extract the line defining VERSION from the file and evaluate it 
on
+#  its own.
 #****
 #****v* Globals/RELEASE
 #  DESCRIPTION
 #  The Cygwin package release number, e.g. the "1" in foo-2.3.4-1.  The first
 #  release of a new version is usually 1, and is incremented if subsequent
 #  releases are made of the same version.
+#
+#  NOTE
+#  This variable should be assigned a literal value, since cygport expects to
+#  be able to extract the line defining RELEASE from the file and evaluate it 
on
+#  its own.
 #****
 #****d* Globals/PN
 #  DESCRIPTION
diff --git a/meson.build b/meson.build
index 1adfa397..17d98d8f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
 project('cygport',
-        version: '0.37.1')
+        version: '0.37.2')
 
 bindir = join_paths(get_option('prefix'), get_option('bindir'))
 datadir = join_paths(get_option('prefix'), get_option('datadir'))
diff --git a/testsuite/python/meson.build b/testsuite/python/meson.build
index abf33b66..9cd3618d 100644
--- a/testsuite/python/meson.build
+++ b/testsuite/python/meson.build
@@ -9,3 +9,5 @@ endif
 if pip37.found() and pip38.found()
 tests += [['python/wheel']]
 endif
+
+tests += [['python/normalization']]
diff --git 
a/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python-license-expression-30.4.3-1-src.hint
 
b/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python-license-expression-30.4.3-1-src.hint
new file mode 100644
index 00000000..d726d536
--- /dev/null
+++ 
b/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python-license-expression-30.4.3-1-src.hint
@@ -0,0 +1,10 @@
+category: Python
+build-depends: cygport python3-devel
+sdesc: "Python license expression utility library"
+ldesc: "Python comprehensive utility library to parse, compare, simplify
+and normalize license expressions (such as SPDX license expressions)
+using boolean logic."
+skip:
+
+homepage: https://pypi.org/project/license_expression
+license: Apache-2.0
diff --git 
a/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python3-license-expression/python3-license-expression-30.4.3-1-noarch.hint
 
b/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python3-license-expression/python3-license-expression-30.4.3-1-noarch.hint
new file mode 100644
index 00000000..bafe2b65
--- /dev/null
+++ 
b/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python3-license-expression/python3-license-expression-30.4.3-1-noarch.hint
@@ -0,0 +1,6 @@
+category: Python Virtual
+requires: python39-license-expression
+sdesc: "Python license expression utility library"
+ldesc: "The python3-license-expression virtual package. Selecting this package 
for installation will cause the python39-license-expression package to be 
installed."
+external-source: python-license-expression
+
diff --git 
a/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python39-license-expression/python39-license-expression-30.4.3-1-noarch.hint
 
b/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python39-license-expression/python39-license-expression-30.4.3-1-noarch.hint
new file mode 100644
index 00000000..77f41318
--- /dev/null
+++ 
b/testsuite/python/normalization/hints/python-license-expression-30.4.3-1.noarch/dist/python-license-expression/python39-license-expression/python39-license-expression-30.4.3-1-noarch.hint
@@ -0,0 +1,8 @@
+category: Python
+requires: python39
+sdesc: "Python license expression utility library"
+ldesc: "Python comprehensive utility library to parse, compare, simplify
+and normalize license expressions (such as SPDX license expressions)
+using boolean logic."
+external-source: python-license-expression
+
diff --git a/testsuite/python/normalization/python-license-expression.cygport 
b/testsuite/python/normalization/python-license-expression.cygport
new file mode 100644
index 00000000..9b7f3cc4
--- /dev/null
+++ b/testsuite/python/normalization/python-license-expression.cygport
@@ -0,0 +1,24 @@
+# python-license-expression.cygport - Python license-expression Cygwin package 
build control script definitions
+
+inherit python3-wheel
+
+NAME=python-license-expression
+VERSION=30.4.3
+RELEASE=1
+
+CATEGORY=Python
+SUMMARY="Python license expression utility library"
+DESCRIPTION="Python comprehensive utility library to parse, compare, simplify
+and normalize license expressions (such as SPDX license expressions)
+using boolean logic."
+
+ARCH=noarch
+
+BUILD_REQUIRES="python3-devel"
+
+LICENSE=Apache-2.0
+
+DOCS="
+       license-expression.ABOUT
+       AUTHORS.rst CHANGELOG.rst CODE_OF_CONDUCT.rst README.rst
+"
diff --git a/testsuite/python/normalization/python-license-expression.list 
b/testsuite/python/normalization/python-license-expression.list
new file mode 100644
index 00000000..850d9d92
--- /dev/null
+++ b/testsuite/python/normalization/python-license-expression.list
@@ -0,0 +1,31 @@
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/INSTALLER
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/METADATA
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/RECORD
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/REQUESTED
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/WHEEL
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/direct_url.json
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/licenses/AUTHORS.rst
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/licenses/CHANGELOG.rst
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/licenses/CODE_OF_CONDUCT.rst
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/licenses/NOTICE
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/licenses/README.rst
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/licenses/apache-2.0.LICENSE
+/usr/lib/python3.9/site-packages/license_expression-30.4.3.dist-info/top_level.txt
+/usr/lib/python3.9/site-packages/license_expression/__init__.py
+/usr/lib/python3.9/site-packages/license_expression/__pycache__/__init__.cpython-39.opt-1.pyc
+/usr/lib/python3.9/site-packages/license_expression/__pycache__/__init__.cpython-39.opt-2.pyc
+/usr/lib/python3.9/site-packages/license_expression/__pycache__/__init__.cpython-39.pyc
+/usr/lib/python3.9/site-packages/license_expression/__pycache__/_pyahocorasick.cpython-39.opt-1.pyc
+/usr/lib/python3.9/site-packages/license_expression/__pycache__/_pyahocorasick.cpython-39.opt-2.pyc
+/usr/lib/python3.9/site-packages/license_expression/__pycache__/_pyahocorasick.cpython-39.pyc
+/usr/lib/python3.9/site-packages/license_expression/_pyahocorasick.ABOUT
+/usr/lib/python3.9/site-packages/license_expression/_pyahocorasick.py
+/usr/lib/python3.9/site-packages/license_expression/data/cc-by-4.0.LICENSE
+/usr/lib/python3.9/site-packages/license_expression/data/license_key_index.json.ABOUT
+/usr/lib/python3.9/site-packages/license_expression/data/scancode-licensedb-index.json
+/usr/share/doc/python39-license-expression/AUTHORS.rst
+/usr/share/doc/python39-license-expression/CHANGELOG.rst
+/usr/share/doc/python39-license-expression/CODE_OF_CONDUCT.rst
+/usr/share/doc/python39-license-expression/NOTICE
+/usr/share/doc/python39-license-expression/README.rst
+/usr/share/doc/python39-license-expression/license-expression.ABOUT
diff --git a/testsuite/python/normalization/vars 
b/testsuite/python/normalization/vars
new file mode 100644
index 00000000..1e3ebc5e
--- /dev/null
+++ b/testsuite/python/normalization/vars
@@ -0,0 +1,4 @@
+declare -r ARCHES="noarch"
+declare -- BUILD_REQUIRES="python3-devel"
+declare -- CROSS_HOST=""
+declare -- INHERITED="python.org python-wheel python3 python3-wheel autotools "

Reply via email to