pdm icon indicating copy to clipboard operation
pdm copied to clipboard

Outcome of "Is the project a library that will be uploaded to PyPI" unclear

Open lofidevops opened this issue 3 years ago • 1 comments

  • [x] I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

  • pdm init

Actual behavior

Prompted "Is the project a library that will be uploaded to PyPI [y/n] (n):"

Expected behavior

Some indication about the impact of this decision. I couldn't find anything in the documentation.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:
  2.1.2
Python Interpreter:
  /home/user/Documents/project/.venv/bin/python (3.10)
Project Root:
  /home/user/Documents/project
Project Packages:
  None
{
  "implementation_name": "cpython",
  "implementation_version": "3.10.4",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.15.0-46-generic",
  "platform_system": "Linux",
  "platform_version": "#49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022",
  "python_full_version": "3.10.4",
  "platform_python_implementation": "CPython",
  "python_version": "3.10",
  "sys_platform": "linux"
}

lofidevops avatar Aug 15 '22 20:08 lofidevops

See https://github.com/pdm-project/pdm/issues/253

lofidevops avatar Aug 18 '22 20:08 lofidevops

To clarify... (source at https://github.com/pdm-project/pdm/blob/main/src/pdm/cli/commands/init.py#L79-L89)

If YES, this collects a name, version, and description and at runtime, setting a name has the side-effect of installing the project as editable.

If NO, the above fields are left null and at runtime the project is not installed as editable.

It seems awkward that the "name" field is used to determine if the project should be installed. I'd be very surprised if populating the name field led to the side-effect described in https://github.com/pdm-project/pdm/issues/253

I'm not sure just documenting is the best solution to clarifying the behavior here. The prompt itself is ambiguous and I expect to be able to set these fields during init whether its intended for usage as a PyPI library or not.

zanieb avatar Sep 22 '22 19:09 zanieb