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

Move most static metadata to pyproject.toml. #9745

Merged
merged 6 commits into from May 6, 2024

Conversation

Sachaa-Thanasius
Copy link
Contributor

@Sachaa-Thanasius Sachaa-Thanasius commented Mar 4, 2024

Summary

It moves most of the library's metadata to pyproject.toml from setup.py, excluding the library version due to its particular type of dynamism and the fact that code would seemingly be required for it regardless of possible alternatives like setuptools_scm.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

- The version thing could be done with a setuptools_scm plugin, maybe, but every option that I've seen still requires code, so I'm leaving the current code for creating the version string alone.
@Sachaa-Thanasius
Copy link
Contributor Author

Sachaa-Thanasius commented Mar 4, 2024

Hmm. I'm not sure what's causing the issue here, but I'd guess that moving the data somehow . . . changed the impact of manually setting PYTHONPATH to the path of the working directory, thus breaking imports? Running the same tests on my machine works just fine after an editable install, without the PYTHONPATH="$(pwd)" portion of the command. Maybe I'm missing something obvious.

@Sachaa-Thanasius
Copy link
Contributor Author

Sachaa-Thanasius commented Mar 5, 2024

@Rapptz Any pointers on what's causing these tests to fail? I'm guessing it has to do with the explicit PYTHONPATH in the pytest call since aiohttp can't be found for importing, and the tests seem to work fine when run locally sans explicit PYTHONPATH .

Edit: I take it back; the exact command sequence doesn't work locally. I was assuming the 'install requirements' command would installed base dependencies, but it doesn't.

Edit2: Managed to figure it out.

@Sachaa-Thanasius Sachaa-Thanasius marked this pull request as ready for review March 5, 2024 20:15
@@ -1,7 +1,84 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setuptools automatically installs wheel if needed. Further info is in the first note in this section: https://setuptools.pypa.io/en/latest/userguide/quickstart.html#basic-use

Copy link
Owner

@Rapptz Rapptz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Let's give this a try.

@Rapptz Rapptz merged commit 0c35354 into Rapptz:master May 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants