Skip to content

Version 0.8.0 failing with FileNotFoundError #43

Description

@genericmoniker

Describe the bug

With the release of 0.8.0 I discovered:

  1. I don't have the version of pdm-packer pinned in my project
  2. I get a FileNotFoundError when I try to pack

To Reproduce

$ pdm --version
PDM, version 2.18.1
$ mkdir test
$ cd test
$ pdm init
Creating a pyproject.toml for PDM...
Please enter the Python interpreter to use
 0. cpython@3.9 (/usr/bin/python3)
 1. cpython@3.12 (/usr/bin/python3.12)
 2. cpython@3.9 (/usr/bin/python3.9)
 3. cpython@3.12 (/bin/python3.12)
Please select (0): 1
Virtualenv is created successfully at /home/vagrant/test/.venv
Project name (test): 
Project version (0.1.0): 
Do you want to build this project for distribution(such as wheel)?
If yes, it will be installed by default when running `pdm install`. [y/n] (n): 
License(SPDX name) (MIT): 
Author name (Eric Smith): 
Author email (eric@esmithy.net): 
Python requires('*' to allow any) (==3.12.*): 
Project is initialized successfully
$ vi pyproject.toml    # Adding `plugins = ["pdm-packer"]`
$ pdm install --plugins
Plugins are installed successfully into .pdm-plugins.
$ pdm lock
Changes are written to pdm.lock.
  0:00:00 🔒 Lock successful.  
$ pdm pack
Packing packages...
/home/vagrant/test/.pdm-plugins/lib/python3.12/site-packages/pdm_packer/env.py:55: PDMDeprecationWarning: .values() is deprecated on the requirements collection, it's not a mapping but a list.
  requirements = project.get_dependencies().values()
All packages are synced to date, nothing to do.
  ✔ Install test 0.1.0 successful

  0:00:00 🎉 All complete! 0/0
[FileNotFoundError]: [Errno 2] No such file or directory: '/tmp/pdm-pack-c68x4fg7/lib64/python3.12/site-packages'
WARNING: Add '-v' to see the detailed traceback

Expected behavior

A zipapp to be created.

System (please complete the following information):

  • pdm-packer version: 0.8.0
  • Python version: 3.12.5
  • OS: Linux

Additional 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions