Open genericmoniker opened 2 months ago
Can you show the output of the following command:
/usr/bin/python3.12 /path/to/pdm/lib/site-packages/pdm/models/in_process/sysconfig_get_paths.py prefix
Sure:
$ /usr/bin/python3.12 /usr/local/lib/python3.12/site-packages/pdm/models/in_process/sysconfig_get_paths.py prefix
{"stdlib": "/usr/lib64/python3.12", "platstdlib": "/usr/local/lib64/python3.12", "purelib": "/usr/local/lib/python3.12/site-packages", "platlib": "/usr/local/lib64/python3.12/site-packages", "include": "/usr/include/python3.12", "platinclude": "/usr/include/python3.12", "scripts": "/usr/local/bin", "data": "/usr/local"}
That does not make sense, since we are using the purelib
path:
https://github.com/frostming/pdm-packer/blob/3ec0828a8f18711028bf73702b029de62295914d/src/pdm_packer/env.py#L74
Can you provide the full traceback by adding -v
$ pdm pack -v
Packing packages...
STATUS: Resolving packages from lockfile...
All packages are synced to date, nothing to do.
Installing the project as a package...
✔ Install test 0.1.0 successful
🎉 All complete!
Traceback (most recent call last):
File "/usr/local/bin/pdm", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.12/site-packages/pdm/core.py", line 351, in main
return core.main(args or sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pdm/core.py", line 269, in main
raise cast(Exception, err).with_traceback(traceback) from None
File "/usr/local/lib/python3.12/site-packages/pdm/core.py", line 264, in main
self.handle(project, options)
File "/usr/local/lib/python3.12/site-packages/pdm/core.py", line 196, in handle
command.handle(project, options)
File "/home/vagrant/test/.pdm-plugins/lib/python3.12/site-packages/pdm_packer/command.py", line 114, in handle
lib = pack_env.prepare_lib_for_pack(compile=options.compile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vagrant/test/.pdm-plugins/lib/python3.12/site-packages/pdm_packer/env.py", line 73, in prepare_lib_for_pack
synchronizer.synchronize()
File "/usr/local/lib/python3.12/site-packages/pdm/installers/synchronizers.py", line 441, in synchronize
self._fix_pth_files()
File "/usr/local/lib/python3.12/site-packages/pdm/installers/synchronizers.py", line 333, in _fix_pth_files
for path in list(Path(lib_paths[scheme]).iterdir()):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/pathlib.py", line 1056, in iterdir
for name in os.listdir(self):
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pdm-pack-h9fyqbtr/lib64/python3.12/site-packages'
Just in case it is interesting...
$ uname -srm
Linux 6.8.0-40-generic x86_64
$ lsb_release -a
LSB Version: n/a
Distributor ID: CentOS
Description: CentOS Stream 9
Release: 9
Codename: n/a
Running under Docker.
Describe the bug
With the release of 0.8.0 I discovered:
To Reproduce
Expected behavior
A zipapp to be created.
System (please complete the following information):
pdm-packer
version: 0.8.0Additional context
In debugging, the first exists, but the second doesn't:
/tmp/pdm-pack-c68x4fg7/lib/python3.12/site-packages /tmp/pdm-pack-c68x4fg7/lib64/python3.12/site-packages
If I pin the version to 0.7.0, packing works (other than an expected "Archive has no entry point").
Also, BTW, 0.7.0 doesn't exist in CHANGELOG.md.