fsfe / reuse-tool

reuse is a tool for compliance with the REUSE recommendations.
https://reuse.software
396 stars 149 forks source link

Files missing from `sdist` and version-specific wheel #738

Open rpatterson opened 1 year ago

rpatterson commented 1 year ago

I see a couple of bugs in the current published release distributions:

  1. The only published wheel is for Python 3.11
  2. Building a wheel from the sdist produces a wheel that is missing the actual *.py files

It looks like this started with the v1.1.0 release because the v1.0.0 release published a wheel for any Python version and successfully builds a wheel including the *.py files from the *.tar.gz sdist:

$ rm -rf ~/.cache/pip ./reuse-* && pip wheel reuse==1.0.0 && unzip -l ./reuse-*.whl
Collecting reuse==1.0.0
  Downloading reuse-1.0.0-py3-none-any.whl (149 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 149.4/149.4 KB 7.1 MB/s eta 0:00:00

Collecting setuptools
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/setuptools-67.7.2-py3-none-any.whl
Collecting requests
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/requests-2.29.0-py3-none-any.whl
Collecting boolean.py
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/boolean.py-4.0-py3-none-any.whl
Collecting binaryornot
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/binaryornot-0.4.4-py2.py3-none-any.whl
Collecting license-expression
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/license_expression-30.1.0-py3-none-any.whl
Collecting python-debian
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/python_debian-0.1.49-py3-none-any.whl
Collecting Jinja2
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/Jinja2-3.1.2-py3-none-any.whl
Collecting chardet>=3.0.2
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/chardet-5.1.0-py3-none-any.whl
Collecting MarkupSafe>=2.0
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Collecting certifi>=2017.4.17
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/certifi-2022.12.7-py3-none-any.whl
Collecting idna<4,>=2.5
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/idna-3.4-py3-none-any.whl
Collecting charset-normalizer<4,>=2
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Collecting urllib3<1.27,>=1.21.1
  File was already downloaded /srv/checkouts/ubuntu/usr/local/src/python-project-structure/urllib3-1.26.15-py2.py3-none-any.whl
Saved ./reuse-1.0.0-py3-none-any.whl
Archive:  ./reuse-1.0.0-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     2467  2022-05-19 08:51   reuse/__init__.py
      232  2021-06-11 10:21   reuse/__main__.py
    21287  2022-05-18 14:15   reuse/_comment.py
     1256  2021-06-11 10:21   reuse/_format.py
     2040  2022-05-12 15:11   reuse/_licenses.py
     8860  2022-05-18 14:15   reuse/_main.py
    15180  2022-05-18 14:15   reuse/_util.py
     5022  2022-05-12 15:11   reuse/download.py
    22545  2022-05-18 14:15   reuse/header.py
     4015  2021-06-11 10:21   reuse/init.py
    10077  2022-05-12 15:11   reuse/lint.py
    12135  2022-05-18 14:15   reuse/project.py
    13902  2022-05-12 15:11   reuse/report.py
     1589  2022-05-18 14:15   reuse/spdx.py
      926  2022-05-12 15:11   reuse/supported_licenses.py
     6626  2021-06-11 10:21   reuse/vcs.py
    19083  2022-05-19 08:57   reuse/locale/de/LC_MESSAGES/reuse.mo
    18051  2022-05-19 08:57   reuse/locale/eo/LC_MESSAGES/reuse.mo
    18394  2022-05-19 08:57   reuse/locale/es/LC_MESSAGES/reuse.mo
    19367  2022-05-19 08:57   reuse/locale/fr/LC_MESSAGES/reuse.mo
    18816  2022-05-19 08:57   reuse/locale/gl/LC_MESSAGES/reuse.mo
    19029  2022-05-19 08:57   reuse/locale/it/LC_MESSAGES/reuse.mo
    18702  2022-05-19 08:57   reuse/locale/nl/LC_MESSAGES/reuse.mo
    19155  2022-05-19 08:57   reuse/locale/pt/LC_MESSAGES/reuse.mo
    18447  2022-05-19 08:57   reuse/locale/tr/LC_MESSAGES/reuse.mo
    16121  2022-05-12 15:11   reuse/resources/exceptions.json
      100  2021-06-11 10:21   reuse/resources/exceptions.json.license
   218743  2022-05-12 15:11   reuse/resources/licenses.json
      100  2021-06-11 10:21   reuse/resources/licenses.json.license
      175  2021-06-11 10:21   reuse/templates/default_template.jinja2
      119  2021-06-11 10:21   reuse/templates/default_template.jinja2.license
     1627  2022-05-19 08:57   reuse-1.0.0.dist-info/AUTHORS.rst
    35423  2022-05-19 08:57   reuse-1.0.0.dist-info/METADATA
       92  2022-05-19 08:57   reuse-1.0.0.dist-info/WHEEL
       43  2022-05-19 08:57   reuse-1.0.0.dist-info/entry_points.txt
        6  2022-05-19 08:57   reuse-1.0.0.dist-info/top_level.txt
     3052  2022-05-19 08:57   reuse-1.0.0.dist-info/RECORD
---------                     -------
   572804                     37 files

But the current v1.1.0 release and the following releases build a wheel without the *.py files:

Collecting reuse==1.1.0
  Downloading reuse-1.1.0.tar.gz (217 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 217.0/217.0 KB 5.8 MB/s eta 0:00:00

  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Jinja2<4.0.0,>=3.0.0
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 KB 18.4 MB/s eta 0:00:00

Collecting boolean.py>=3.8
  Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
Collecting binaryornot<0.5.0,>=0.4.4
  Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting setuptools
  Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
Collecting python-debian!=0.1.45,!=0.1.46,!=0.1.47,<0.2.0,>=0.1.38
  Downloading python_debian-0.1.49-py3-none-any.whl (132 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.5/132.5 KB 19.6 MB/s eta 0:00:00

Collecting license-expression>=1.0
  Downloading license_expression-30.1.0-py3-none-any.whl (100 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.1/100.1 KB 15.7 MB/s eta 0:00:00

Collecting chardet>=3.0.2
  Downloading chardet-5.1.0-py3-none-any.whl (199 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.1/199.1 KB 20.8 MB/s eta 0:00:00

Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Saved ./binaryornot-0.4.4-py2.py3-none-any.whl
Saved ./boolean.py-4.0-py3-none-any.whl
Saved ./Jinja2-3.1.2-py3-none-any.whl
Saved ./license_expression-30.1.0-py3-none-any.whl
Saved ./python_debian-0.1.49-py3-none-any.whl
Saved ./chardet-5.1.0-py3-none-any.whl
Saved ./MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./setuptools-67.7.2-py3-none-any.whl
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml) ... done
  Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=113199 sha256=f89ee127c593b2376b86bcf1e81d6741943210d12fb3a5925db08bc8e196416d
  Stored in directory: /home/rpatterson/.cache/pip/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
Successfully built reuse
Archive:  ./reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     1776  1980-01-01 00:00   AUTHORS.rst
    26055  1980-01-01 00:00   CHANGELOG.md
    10102  1980-01-01 00:00   README.md
    19083  1980-01-01 00:00   reuse/locale/de/LC_MESSAGES/reuse.mo
    18051  1980-01-01 00:00   reuse/locale/eo/LC_MESSAGES/reuse.mo
    18394  1980-01-01 00:00   reuse/locale/es/LC_MESSAGES/reuse.mo
    19367  1980-01-01 00:00   reuse/locale/fr/LC_MESSAGES/reuse.mo
    18816  1980-01-01 00:00   reuse/locale/gl/LC_MESSAGES/reuse.mo
    19029  1980-01-01 00:00   reuse/locale/it/LC_MESSAGES/reuse.mo
    18702  1980-01-01 00:00   reuse/locale/nl/LC_MESSAGES/reuse.mo
    19155  1980-01-01 00:00   reuse/locale/pt/LC_MESSAGES/reuse.mo
    18447  1980-01-01 00:00   reuse/locale/tr/LC_MESSAGES/reuse.mo
    11358  1980-01-01 00:00   reuse-1.1.0.dist-info/LICENSES/Apache-2.0.txt
    20131  1980-01-01 00:00   reuse-1.1.0.dist-info/LICENSES/CC-BY-SA-4.0.txt
     7048  1980-01-01 00:00   reuse-1.1.0.dist-info/LICENSES/CC0-1.0.txt
    35149  1980-01-01 00:00   reuse-1.1.0.dist-info/LICENSES/GPL-3.0-or-later.txt
    11356  1980-01-01 00:00   reuse-1.1.0.dist-info/METADATA
      110  1980-01-01 00:00   reuse-1.1.0.dist-info/WHEEL
       42  1980-01-01 00:00   reuse-1.1.0.dist-info/entry_points.txt
     1762  2016-01-01 00:00   reuse-1.1.0.dist-info/RECORD
---------                     -------
   293933                     20 files

So it looks like v1.1.0 introduced at least one issue was introduced with the release process that resulted in both issues or introduced 2 unrelated issues.

rpatterson commented 1 year ago

For those looking for a workaround restricting the requirement to before the first broken release is working for me: reuse<1.1.0.

rpatterson commented 1 year ago

It's also worth noting that the project's supported Python versions badge goes up to 3.10, IOW it does not include 3.11. So maybe that and/or your classifiers should be updated as well?

rpatterson commented 1 year ago

I don't mean to pester, but in case maintainers missed this, this seems like a pretty critical bug to me, @mxmehl. Everyone is stuck using v1.0.0 or a git checkout until this is resolved. It's worth noting that PyPI won't allow uploading releases whose requirements include direct URLs such as reuse @ git+https://github.com/fsfe/reuse-tool.git requirements, including for extras. So those of us publishing releases with reuse properly declared as a development dependency in their requirements, e.g. in a devel extra, are stuck using v.1.0.0.

mxmehl commented 1 year ago

Most likely, @linozen and @carmenbianca will have to look into that.

carmenbianca commented 1 year ago

I cannot reproduce this on either tag v1.1.0 or tag v1.1.2.

v1.1.2

⬢ 📺 coopiteasy reuse-tool $ poetry build
Preparing build environment with build-system requirements poetry-core>=1.1.0, setuptools
Building reuse (1.1.2)
⬢ 📺 coopiteasy reuse-tool $ cd dist/
⬢ 📺 coopiteasy dist $ ls
reuse-1.1.2-cp311-cp311-manylinux_2_37_x86_64.whl  reuse-1.1.2.tar.gz
⬢ 📺 coopiteasy dist $ rm reuse-1.1.2-cp311-cp311-manylinux_2_37_x86_64.whl 
⬢ 📺 coopiteasy dist $ pip wheel reuse-1.1.2.tar.gz 
Processing ./reuse-1.1.2.tar.gz
  File was already downloaded /var/home/coopiteasy/Projets/FSFE/reuse-tool/dist/reuse-1.1.2.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Jinja2<4.0.0,>=3.0.0
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting binaryornot<0.5.0,>=0.4.4
  Using cached binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting boolean.py>=3.8
  Using cached boolean.py-4.0-py3-none-any.whl (25 kB)
Collecting license-expression>=1.0
  Using cached license_expression-30.1.0-py3-none-any.whl (100 kB)
Collecting python-debian!=0.1.45,!=0.1.46,!=0.1.47,<0.2.0,>=0.1.38
  Using cached python_debian-0.1.49-py3-none-any.whl (132 kB)
Collecting setuptools
  Using cached setuptools-67.8.0-py3-none-any.whl (1.1 MB)
Collecting chardet>=3.0.2
  Using cached chardet-5.1.0-py3-none-any.whl (199 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27 kB)
Saved ./binaryornot-0.4.4-py2.py3-none-any.whl
Saved ./boolean.py-4.0-py3-none-any.whl
Saved ./Jinja2-3.1.2-py3-none-any.whl
Saved ./license_expression-30.1.0-py3-none-any.whl
Saved ./python_debian-0.1.49-py3-none-any.whl
Saved ./chardet-5.1.0-py3-none-any.whl
Saved ./MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./setuptools-67.8.0-py3-none-any.whl
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml) ... done
  Created wheel for reuse: filename=reuse-1.1.2-cp311-cp311-manylinux_2_37_x86_64.whl size=164681 sha256=e0573a5040a3a9d63ed0c5de1072c59cf6107c130da07697afec3687914e1ee1
  Stored in directory: /var/home/coopiteasy/.cache/pip/wheels/bb/75/2a/fcd0aa4d5438d1e083e4cc48252cec56918726adbce1379da9
Successfully built reuse
⬢ 📺 coopiteasy dist $ ls
binaryornot-0.4.4-py2.py3-none-any.whl      MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
boolean.py-4.0-py3-none-any.whl             python_debian-0.1.49-py3-none-any.whl
chardet-5.1.0-py3-none-any.whl              reuse-1.1.2-cp311-cp311-manylinux_2_37_x86_64.whl
Jinja2-3.1.2-py3-none-any.whl               reuse-1.1.2.tar.gz
license_expression-30.1.0-py3-none-any.whl  setuptools-67.8.0-py3-none-any.whl
⬢ 📺 coopiteasy dist $ unzip -l reuse-1.1.2-cp311-cp311-manylinux_2_37_x86_64.whl 
Archive:  reuse-1.1.2-cp311-cp311-manylinux_2_37_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     2467  01-01-1980 00:00   reuse/__init__.py
      254  01-01-1980 00:00   reuse/__main__.py
    23030  01-01-1980 00:00   reuse/_comment.py
     1256  01-01-1980 00:00   reuse/_format.py
     2040  01-01-1980 00:00   reuse/_licenses.py
     9191  01-01-1980 00:00   reuse/_main.py
    16868  01-01-1980 00:00   reuse/_util.py
     5034  01-01-1980 00:00   reuse/download.py
    24624  01-01-1980 00:00   reuse/header.py
     4015  01-01-1980 00:00   reuse/init.py
    10077  01-01-1980 00:00   reuse/lint.py
    19083  01-01-1980 00:00   reuse/locale/de/LC_MESSAGES/reuse.mo
    18051  01-01-1980 00:00   reuse/locale/eo/LC_MESSAGES/reuse.mo
    18394  01-01-1980 00:00   reuse/locale/es/LC_MESSAGES/reuse.mo
    19367  01-01-1980 00:00   reuse/locale/fr/LC_MESSAGES/reuse.mo
    18816  01-01-1980 00:00   reuse/locale/gl/LC_MESSAGES/reuse.mo
    19029  01-01-1980 00:00   reuse/locale/it/LC_MESSAGES/reuse.mo
    18702  01-01-1980 00:00   reuse/locale/nl/LC_MESSAGES/reuse.mo
    19155  01-01-1980 00:00   reuse/locale/pt/LC_MESSAGES/reuse.mo
    18447  01-01-1980 00:00   reuse/locale/tr/LC_MESSAGES/reuse.mo
    12135  01-01-1980 00:00   reuse/project.py
    13902  01-01-1980 00:00   reuse/report.py
    17950  01-01-1980 00:00   reuse/resources/exceptions.json
      100  01-01-1980 00:00   reuse/resources/exceptions.json.license
   223999  01-01-1980 00:00   reuse/resources/licenses.json
      100  01-01-1980 00:00   reuse/resources/licenses.json.license
     1589  01-01-1980 00:00   reuse/spdx.py
      926  01-01-1980 00:00   reuse/supported_licenses.py
      175  01-01-1980 00:00   reuse/templates/default_template.jinja2
      119  01-01-1980 00:00   reuse/templates/default_template.jinja2.license
     6626  01-01-1980 00:00   reuse/vcs.py
    11358  01-01-1980 00:00   reuse-1.1.2.dist-info/LICENSES/Apache-2.0.txt
    20131  01-01-1980 00:00   reuse-1.1.2.dist-info/LICENSES/CC-BY-SA-4.0.txt
     7048  01-01-1980 00:00   reuse-1.1.2.dist-info/LICENSES/CC0-1.0.txt
    35149  01-01-1980 00:00   reuse-1.1.2.dist-info/LICENSES/GPL-3.0-or-later.txt
    11356  01-01-1980 00:00   reuse-1.1.2.dist-info/METADATA
      110  01-01-1980 00:00   reuse-1.1.2.dist-info/WHEEL
       42  01-01-1980 00:00   reuse-1.1.2.dist-info/entry_points.txt
     3290  01-01-2016 00:00   reuse-1.1.2.dist-info/RECORD
---------                     -------
   634005                     39 files

v1.1.0

(never mind the different shell prompt here)

⬢ (reusetmp) 🐚 coopiteasy reuse-tool 1cd6ec5 $ poetry build
Preparing build environment with build-system requirements poetry-core>=1.1.0, setuptools
Building reuse (1.1.0)
⬢ (reusetmp) 🐚 coopiteasy reuse-tool 1cd6ec5 $ cd dist/
⬢ (reusetmp) 🐚 coopiteasy dist 1cd6ec5 $ ls
reuse-1.1.0.tar.gz  reuse-1.1.0-cp311-cp311-manylinux_2_37_x86_64.whl
⬢ (reusetmp) 🐚 coopiteasy dist 1cd6ec5 $ rm reuse-1.1.0-cp311-cp311-manylinux_2_37_x86_64.whl
⬢ (reusetmp) 🐚 coopiteasy dist 1cd6ec5 $ pip wheel reuse-1.1.0.tar.gz
Processing ./reuse-1.1.0.tar.gz
  File was already downloaded /var/home/coopiteasy/Projets/FSFE/reuse-tool/dist/reuse-1.1.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Jinja2<4.0.0,>=3.0.0
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting binaryornot<0.5.0,>=0.4.4
  Using cached binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting boolean.py>=3.8
  Using cached boolean.py-4.0-py3-none-any.whl (25 kB)
Collecting license-expression>=1.0
  Using cached license_expression-30.1.0-py3-none-any.whl (100 kB)
Collecting python-debian!=0.1.45,!=0.1.46,!=0.1.47,<0.2.0,>=0.1.38
  Using cached python_debian-0.1.49-py3-none-any.whl (132 kB)
Collecting setuptools
  Using cached setuptools-67.8.0-py3-none-any.whl (1.1 MB)
Collecting chardet>=3.0.2
  Using cached chardet-5.1.0-py3-none-any.whl (199 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27 kB)
Saved ./binaryornot-0.4.4-py2.py3-none-any.whl
Saved ./boolean.py-4.0-py3-none-any.whl
Saved ./Jinja2-3.1.2-py3-none-any.whl
Saved ./license_expression-30.1.0-py3-none-any.whl
Saved ./python_debian-0.1.49-py3-none-any.whl
Saved ./chardet-5.1.0-py3-none-any.whl
Saved ./MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./setuptools-67.8.0-py3-none-any.whl
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml) ... done
  Created wheel for reuse: filename=reuse-1.1.0-cp311-cp311-manylinux_2_37_x86_64.whl size=180116 sha256=45deb032ac8040545e10fa6a534925f4ad3cf0444c0be7098167b8151769dcd6
  Stored in directory: /var/home/coopiteasy/.cache/pip/wheels/5a/60/37/2de407e316c4a0fa253ab0e3f2ebffa8aeb8e01b278151f8ee
Successfully built reuse

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
⬢ (reusetmp) 🐚 coopiteasy dist 1cd6ec5 $ unzip -l reuse-1.1.0-cp311-cp311-manylinux_2_37_x86_64.whl
Archive:  reuse-1.1.0-cp311-cp311-manylinux_2_37_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     1776  01-01-1980 00:00   AUTHORS.rst
    26055  01-01-1980 00:00   CHANGELOG.md
    10102  01-01-1980 00:00   README.md
     2467  01-01-1980 00:00   reuse/__init__.py
      254  01-01-1980 00:00   reuse/__main__.py
    23030  01-01-1980 00:00   reuse/_comment.py
     1256  01-01-1980 00:00   reuse/_format.py
     2040  01-01-1980 00:00   reuse/_licenses.py
     9191  01-01-1980 00:00   reuse/_main.py
    16868  01-01-1980 00:00   reuse/_util.py
     5034  01-01-1980 00:00   reuse/download.py
    24624  01-01-1980 00:00   reuse/header.py
     4015  01-01-1980 00:00   reuse/init.py
    10077  01-01-1980 00:00   reuse/lint.py
    19083  01-01-1980 00:00   reuse/locale/de/LC_MESSAGES/reuse.mo
    18051  01-01-1980 00:00   reuse/locale/eo/LC_MESSAGES/reuse.mo
    18394  01-01-1980 00:00   reuse/locale/es/LC_MESSAGES/reuse.mo
    19367  01-01-1980 00:00   reuse/locale/fr/LC_MESSAGES/reuse.mo
    18816  01-01-1980 00:00   reuse/locale/gl/LC_MESSAGES/reuse.mo
    19029  01-01-1980 00:00   reuse/locale/it/LC_MESSAGES/reuse.mo
    18702  01-01-1980 00:00   reuse/locale/nl/LC_MESSAGES/reuse.mo
    19155  01-01-1980 00:00   reuse/locale/pt/LC_MESSAGES/reuse.mo
    18447  01-01-1980 00:00   reuse/locale/tr/LC_MESSAGES/reuse.mo
    12135  01-01-1980 00:00   reuse/project.py
    13902  01-01-1980 00:00   reuse/report.py
    17950  01-01-1980 00:00   reuse/resources/exceptions.json
      100  01-01-1980 00:00   reuse/resources/exceptions.json.license
   223999  01-01-1980 00:00   reuse/resources/licenses.json
      100  01-01-1980 00:00   reuse/resources/licenses.json.license
     1589  01-01-1980 00:00   reuse/spdx.py
      926  01-01-1980 00:00   reuse/supported_licenses.py
      175  01-01-1980 00:00   reuse/templates/default_template.jinja2
      119  01-01-1980 00:00   reuse/templates/default_template.jinja2.license
     6626  01-01-1980 00:00   reuse/vcs.py
    11358  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/Apache-2.0.txt
    20131  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/CC-BY-SA-4.0.txt
     7048  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/CC0-1.0.txt
    35149  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/GPL-3.0-or-later.txt
    11356  01-01-1980 00:00   reuse-1.1.0.dist-info/METADATA
      110  01-01-1980 00:00   reuse-1.1.0.dist-info/WHEEL
       42  01-01-1980 00:00   reuse-1.1.0.dist-info/entry_points.txt
     3495  01-01-2016 00:00   reuse-1.1.0.dist-info/RECORD
---------                     -------
   672143                     42 files

v1.1.0 using the provided command

⬢ (reusetmp) 🐚 coopiteasy reuse1 $ rm -rf ~/.cache/pip ./reuse-* && pip wheel reuse==1.1.0 && unzip -l ./reuse-*.whl
Collecting reuse==1.1.0
  Downloading reuse-1.1.0-cp311-cp311-manylinux_2_36_x86_64.whl (180 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 180.1/180.1 kB 2.3 MB/s eta 0:00:00
Collecting Jinja2<4.0.0,>=3.0.0
  File was already downloaded /tmp/reuse1/Jinja2-3.1.2-py3-none-any.whl
Collecting binaryornot<0.5.0,>=0.4.4
  File was already downloaded /tmp/reuse1/binaryornot-0.4.4-py2.py3-none-any.whl
Collecting boolean.py>=3.8
  File was already downloaded /tmp/reuse1/boolean.py-4.0-py3-none-any.whl
Collecting license-expression>=1.0
  File was already downloaded /tmp/reuse1/license_expression-30.1.0-py3-none-any.whl
Collecting python-debian!=0.1.45,!=0.1.46,!=0.1.47,<0.2.0,>=0.1.38
  File was already downloaded /tmp/reuse1/python_debian-0.1.49-py3-none-any.whl
Collecting setuptools
  File was already downloaded /tmp/reuse1/setuptools-67.8.0-py3-none-any.whl
Collecting chardet>=3.0.2
  File was already downloaded /tmp/reuse1/chardet-5.1.0-py3-none-any.whl
Collecting MarkupSafe>=2.0
  File was already downloaded /tmp/reuse1/MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved ./reuse-1.1.0-cp311-cp311-manylinux_2_36_x86_64.whl

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
Archive:  ./reuse-1.1.0-cp311-cp311-manylinux_2_36_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     1776  01-01-1980 00:00   AUTHORS.rst
    26055  01-01-1980 00:00   CHANGELOG.md
    10102  01-01-1980 00:00   README.md
     2467  01-01-1980 00:00   reuse/__init__.py
      254  01-01-1980 00:00   reuse/__main__.py
    23030  01-01-1980 00:00   reuse/_comment.py
     1256  01-01-1980 00:00   reuse/_format.py
     2040  01-01-1980 00:00   reuse/_licenses.py
     9191  01-01-1980 00:00   reuse/_main.py
    16868  01-01-1980 00:00   reuse/_util.py
     5034  01-01-1980 00:00   reuse/download.py
    24624  01-01-1980 00:00   reuse/header.py
     4015  01-01-1980 00:00   reuse/init.py
    10077  01-01-1980 00:00   reuse/lint.py
    19083  01-01-1980 00:00   reuse/locale/de/LC_MESSAGES/reuse.mo
    18051  01-01-1980 00:00   reuse/locale/eo/LC_MESSAGES/reuse.mo
    18394  01-01-1980 00:00   reuse/locale/es/LC_MESSAGES/reuse.mo
    19367  01-01-1980 00:00   reuse/locale/fr/LC_MESSAGES/reuse.mo
    18816  01-01-1980 00:00   reuse/locale/gl/LC_MESSAGES/reuse.mo
    19029  01-01-1980 00:00   reuse/locale/it/LC_MESSAGES/reuse.mo
    18702  01-01-1980 00:00   reuse/locale/nl/LC_MESSAGES/reuse.mo
    19155  01-01-1980 00:00   reuse/locale/pt/LC_MESSAGES/reuse.mo
    18447  01-01-1980 00:00   reuse/locale/tr/LC_MESSAGES/reuse.mo
    12135  01-01-1980 00:00   reuse/project.py
    13902  01-01-1980 00:00   reuse/report.py
    17950  01-01-1980 00:00   reuse/resources/exceptions.json
      100  01-01-1980 00:00   reuse/resources/exceptions.json.license
   223999  01-01-1980 00:00   reuse/resources/licenses.json
      100  01-01-1980 00:00   reuse/resources/licenses.json.license
     1589  01-01-1980 00:00   reuse/spdx.py
      926  01-01-1980 00:00   reuse/supported_licenses.py
      175  01-01-1980 00:00   reuse/templates/default_template.jinja2
      119  01-01-1980 00:00   reuse/templates/default_template.jinja2.license
     6626  01-01-1980 00:00   reuse/vcs.py
       42  01-01-2016 00:00   reuse-1.1.0.dist-info/entry_points.txt
     7048  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/CC0-1.0.txt
    35149  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/GPL-3.0-or-later.txt
    20131  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/CC-BY-SA-4.0.txt
    11358  01-01-1980 00:00   reuse-1.1.0.dist-info/LICENSES/Apache-2.0.txt
      105  01-01-2016 00:00   reuse-1.1.0.dist-info/WHEEL
    11305  01-01-2016 00:00   reuse-1.1.0.dist-info/METADATA
     3495  01-01-2016 00:00   reuse-1.1.0.dist-info/RECORD
---------                     -------
   672087                     42 files
rpatterson commented 1 year ago

I cannot reproduce this on either tag v1.1.0 or tag v1.1.2.

Wheels I build from the v.1.1.2 PyPI sdist tarballs in the official Docker Python container do not have the issue of the missing *.py source files, but they do have the issue of being built incorrectly for the specific platform. IOW, they are not reuse-1.1.2-py3-none-any.whl as they should be. That issue is also reflected in the release files for v1.0.0 and v1.1.0 on PyPI. I'll continue debugging the difference in wheel contents on my host OS vs the container, but there's definitely still a problem with the built wheels uploaded to PyPI, @carmenbianca.

$ docker run --rm -it python:3.10 bash -xeu -c 'rm -rf ~/.cache/pip ./reuse-* && pip wheel reuse==1.1.2 && unzip -l ./reuse-*.whl'
+ rm -rf /root/.cache/pip './reuse-*'
+ pip wheel reuse==1.1.2
Collecting reuse==1.1.2
  Downloading reuse-1.1.2.tar.gz (225 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 225.4/225.4 kB 6.3 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting setuptools
  Using cached setuptools-67.8.0-py3-none-any.whl (1.1 MB)
Collecting Jinja2<4.0.0,>=3.0.0
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 13.2 MB/s eta 0:00:00
Collecting binaryornot<0.5.0,>=0.4.4
  Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting boolean.py>=3.8
  Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
Collecting license-expression>=1.0
  Downloading license_expression-30.1.0-py3-none-any.whl (100 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.1/100.1 kB 7.1 MB/s eta 0:00:00
Collecting python-debian!=0.1.45,!=0.1.46,!=0.1.47,<0.2.0,>=0.1.38
  Downloading python_debian-0.1.49-py3-none-any.whl (132 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.5/132.5 kB 15.3 MB/s eta 0:00:00
Collecting chardet>=3.0.2
  Downloading chardet-5.1.0-py3-none-any.whl (199 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.1/199.1 kB 9.2 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Saved /binaryornot-0.4.4-py2.py3-none-any.whl
Saved /boolean.py-4.0-py3-none-any.whl
Saved /Jinja2-3.1.2-py3-none-any.whl
Saved /license_expression-30.1.0-py3-none-any.whl
Saved /python_debian-0.1.49-py3-none-any.whl
Saved /chardet-5.1.0-py3-none-any.whl
Saved /MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Saved /setuptools-67.8.0-py3-none-any.whl
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml) ... done
  Created wheel for reuse: filename=reuse-1.1.2-cp310-cp310-manylinux_2_31_x86_64.whl size=164680 sha256=73e7211fd139fd6bb33bad85c1abdddac4c3eda4ce41a9d0fbeb158db49f20e8
  Stored in directory: /root/.cache/pip/wheels/c4/49/13/ec10c009561084d41c2a6d8c62b981272502ba757a933ce23f
Successfully built reuse

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
+ unzip -l ./reuse-1.1.2-cp310-cp310-manylinux_2_31_x86_64.whl
Archive:  ./reuse-1.1.2-cp310-cp310-manylinux_2_31_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     2467  1980-01-01 00:00   reuse/__init__.py
      254  1980-01-01 00:00   reuse/__main__.py
    23030  1980-01-01 00:00   reuse/_comment.py
     1256  1980-01-01 00:00   reuse/_format.py
     2040  1980-01-01 00:00   reuse/_licenses.py
     9191  1980-01-01 00:00   reuse/_main.py
    16868  1980-01-01 00:00   reuse/_util.py
     5034  1980-01-01 00:00   reuse/download.py
    24624  1980-01-01 00:00   reuse/header.py
     4015  1980-01-01 00:00   reuse/init.py
    10077  1980-01-01 00:00   reuse/lint.py
    19083  1980-01-01 00:00   reuse/locale/de/LC_MESSAGES/reuse.mo
    18051  1980-01-01 00:00   reuse/locale/eo/LC_MESSAGES/reuse.mo
    18394  1980-01-01 00:00   reuse/locale/es/LC_MESSAGES/reuse.mo
    19367  1980-01-01 00:00   reuse/locale/fr/LC_MESSAGES/reuse.mo
    18816  1980-01-01 00:00   reuse/locale/gl/LC_MESSAGES/reuse.mo
    19029  1980-01-01 00:00   reuse/locale/it/LC_MESSAGES/reuse.mo
    18702  1980-01-01 00:00   reuse/locale/nl/LC_MESSAGES/reuse.mo
    19155  1980-01-01 00:00   reuse/locale/pt/LC_MESSAGES/reuse.mo
    18447  1980-01-01 00:00   reuse/locale/tr/LC_MESSAGES/reuse.mo
    12135  1980-01-01 00:00   reuse/project.py
    13902  1980-01-01 00:00   reuse/report.py
    17950  1980-01-01 00:00   reuse/resources/exceptions.json
      100  1980-01-01 00:00   reuse/resources/exceptions.json.license
   223999  1980-01-01 00:00   reuse/resources/licenses.json
      100  1980-01-01 00:00   reuse/resources/licenses.json.license
     1589  1980-01-01 00:00   reuse/spdx.py
      926  1980-01-01 00:00   reuse/supported_licenses.py
      175  1980-01-01 00:00   reuse/templates/default_template.jinja2
      119  1980-01-01 00:00   reuse/templates/default_template.jinja2.license
     6626  1980-01-01 00:00   reuse/vcs.py
    11358  1980-01-01 00:00   reuse-1.1.2.dist-info/LICENSES/Apache-2.0.txt
    20131  1980-01-01 00:00   reuse-1.1.2.dist-info/LICENSES/CC-BY-SA-4.0.txt
     7048  1980-01-01 00:00   reuse-1.1.2.dist-info/LICENSES/CC0-1.0.txt
    35149  1980-01-01 00:00   reuse-1.1.2.dist-info/LICENSES/GPL-3.0-or-later.txt
    11356  1980-01-01 00:00   reuse-1.1.2.dist-info/METADATA
      110  1980-01-01 00:00   reuse-1.1.2.dist-info/WHEEL
       42  1980-01-01 00:00   reuse-1.1.2.dist-info/entry_points.txt
     3290  2016-01-01 00:00   reuse-1.1.2.dist-info/RECORD
---------                     -------
   634005                     39 files
rpatterson commented 1 year ago

Capturing my findings debugging the built wheel contents issue locally. Wheels built from the sdist tarball downloaded from PyPI have the correct contents in both the python:3.10 and ubuntu Docker container images. They also have the correct contents when I add a volume binding my ${HOME} to /root/ in the container, so it doesn't appear to be user configuration. That's also confirmed because I get wheels with the wrong contents when I build locally as root under a $ sudo -i shell. I also get wheels with the wrong contents when I build locally in a virtualenv created with $ python -m venv. So I'm guessing it's either an OS/distribution package I have installed or a Python pip package I have installed in /usr/local/....

rpatterson commented 1 year ago

I removed all locally installed Python packages with # pip freeze | xargs pip uninstall -y as root and confirmed that /usr/local/lib/python3.10/ was empty but the built wheel still had the wrong contents. Debugging installed OS/distribution Python packages is too time consuming for me to tackle ATM, given the number of package dependency conflicts that prevent me from doing something equivalent like # aptitude remove ~i~npython3-. Another approach I might take would be to inspect how pip is assembling the wheels contents in Pdb, but that's also likely to be quite time consuming. So I'm unlikely to put that time in, especially given that this is only happening for reuse and not for various other packages, is only happening for specific versions of that package indicating that at least one of the factors is on the package's side, and that a proper cross-platform wheel from PyPI would likely work just fine if it were available. So I'd suggest focusing on why reuse's package build process is incorrectly producing Python version-specific wheels.

rpatterson commented 1 year ago

Firstly, note that my steps to reproduce are operating on the sdist tarball as downloaded from PyPI. Where are your tarballs coming from? I don't see that in your console output, @carmenbianca.

Oops, I missed the v1.1.0 using the provided command section. Sorry and please disregard my question about where your tarballs are coming from.