Skip to content
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 missing in git repo (but present in sdist tarball) #638

Closed
mgorny opened this issue Nov 3, 2023 · 6 comments
Closed

pyproject.toml missing in git repo (but present in sdist tarball) #638

mgorny opened this issue Nov 3, 2023 · 6 comments

Comments

@mgorny
Copy link

mgorny commented Nov 3, 2023

The Wand-0.6.12.tar.gz sdist on PyPI contains a pyproject.toml but said file isn't present in the git repo. Could you add it, please?

That said, I've noticed because I wanted to submit a fix for two problems:

  1. The wheel dependency is unnecessary (see pypa/setuptools@f7d30a9).
  2. You need to explicitly do something like sys.path.insert(0, ".") before importing files relative to the package directory when using the modern setuptools backend, otherwise it may be unable to import wand.version (depending on PEP517 frontend invocation). (Alternatively, you can use more modern setup.cfg/pyproject.toml approach for getting version from file that doesn't require importing it; see: https://setuptools.pypa.io/en/latest/userguide/declarative_config.html or https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata).

Of course, I can submit PRs for these once the file's in the repo.

@emcconville
Copy link
Owner

Ah dip! The pyproject.toml was a work-in-progress intended for the 0.7.x release.

Of course, I can submit PRs for these once the file's in the repo.

I'd love the help. I'll review the links, and commit the file shortly.

... And thinks for reporting this.

emcconville added a commit that referenced this issue Nov 3, 2023
@emcconville
Copy link
Owner

Added pyproject.toml & setup.cfg. Any help would be great with the more modern approach.

@mgorny
Copy link
Author

mgorny commented Nov 4, 2023

Thanks! You don't actually need all three — everything from setup.cfg can be declared in pyproject.toml. You can also either remove setup.py entirely or limit it to a setuptools.setup() call, as it will automatically read the declarative config.

@emcconville
Copy link
Owner

Great, and thank you for the help. Killing setup.cfg, and I believe the other two are working ask expected. Feel free to review, and suggest any improvements.

@mgorny
Copy link
Author

mgorny commented Nov 5, 2023

Yeah, I think it's fine. The declarations in setup.py for stuff already in pyproject.toml are redundant (i.e. setuptools combines the two) but they don't do any harm either.

@emcconville
Copy link
Owner

Think we're good to close this issue.

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

No branches or pull requests

2 participants