-
-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyproject.toml better management idea #2862
Comments
There's a difference between what Python version you use locally and what Python versions your project supports. Switching between different local Python versions should never change
I cannot reproduce this behavior. % cat pyproject.toml
[project]
name = "p"
version = "0.1.0"
description = "Default template for PDM package"
authors = [
{name = "Timothée Mazzucotelli", email = "dev@pawamoy.fr"},
]
dependencies = []
requires-python = "==3.11.*"
readme = "README.md"
license = {text = "MIT"}
[tool.pdm]
distribution = false
% pdm add invalidpackage123
Adding packages to default dependencies: invalidpackage123
See /home/pawamoy/.local/state/pdm/log/pdm-lock-ch3p_rpi.log for detailed debug log.
[CandidateNotFound]: Unable to find candidates for invalidpackage123. There may exist some issues with the package name or network condition.
WARNING: Add '-v' to see the detailed traceback
% cat pyproject.toml
[project]
name = "p"
version = "0.1.0"
description = "Default template for PDM package"
authors = [
{name = "Timothée Mazzucotelli", email = "dev@pawamoy.fr"},
]
dependencies = []
requires-python = "==3.11.*"
readme = "README.md"
license = {text = "MIT"}
[tool.pdm]
distribution = false |
Why it should be updated? Library authors usually need to test against multiple python versions to make sure the project is compatible within a range of python versions. He should often run
|
can you try with this :
|
Ok got it point 1 is valid. for point 2 can u try with : |
|
You mean running the main project script if it's the only defined script? [project.scripts]
your_script = "your_package.your_module:your_function
I prefer explicit over implicit but I don't have strong opinions here.
You mean when running |
i would be against this. it would open a wormcan of buggy behaviour. somebody would configure it in some contrived way, someone else would expect smth else, and things would diverge. difficult to rollback. |
yes such noobs instructions on project title description and installation tips etc will be good .
2 ) if you add invalid package let say |
It's done in two phases IIUC:
import sys
if not 'sdist' in sys.argv:
sys.exit('\n*** Please install the `scikit-image` package '
'(instead of `skimage`) ***\n')
from setuptools import setup
setup(
name='skimage',
version='0.0',
description='Dummy package that points to scikit-image',
url='https://github.com/scikit-image/scikit-image',
author='Stefan van der Walt',
author_email='stefanv@berkeley.edu'
) So this case is kinda specific to skimage. Not sure about other more generic cases where locking succeeds but install fails: should the project be listed in pyproject.toml? I don't know. |
|
Ok so am new two PDM i found to problems i will highlight it
1 ) initially when u do
pdm init
it ask for python interpreter which it fetch from system let say u select v3.9 from the list. later when u switch likeit switch however it not update the entry in
pyprojet.tom file
i meanrequires-python = ">=3.9"
will be still 3.92 ) if you add invalid package let say
pdm add skimage
it will end up with failed installation because this package not exist however it will store this entry inpyproject.toml
file which it should not . it should only store valid packages entries independencies
blockthanks
The text was updated successfully, but these errors were encountered: