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

normalize pyproject, PEP-621 compliant #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgaitan
Copy link

@mgaitan mgaitan commented May 30, 2024

Remove setup.py and keep only pyproject.toml in a PEP-621 compliance format, using flit to build . The description adn version are declared explicitly in __init__.py module and loaded dynamically for the package.

This fixes "No module named 'pkg_resources'" when setuptools is not available.

$  uv pip install sphinxcontrib-kroki
Resolved 23 packages in 376ms
Installed 1 package in 6ms
 + sphinxcontrib-kroki==1.3.0

  docs_diagrams [$!++(1)?]   (.docs-venv)
Shiphero-API ❯ make docs quick
make[1]: se entra en el directorio '/home/tin/lab/Shiphero-API/docs'
Ejecutando Sphinx v7.1.2

Extension error:
No puede importar la extensión sphinxcontrib.kroki (exception: No module named 'pkg_resources')
make[1]: *** [Makefile:30: quick] Error 2
make[1]: se sale del directorio '/home/tin/lab/Shiphero-API/docs'
make: *** [Makefile:161: docs] Error 2

@mgaitan mgaitan changed the title normalize pyproject, PEP-621 compliance normalize pyproject, PEP-621 compliant May 30, 2024
"sphinx",
"requests>=2.4.2",
"pyyaml",
Copy link
Author

Choose a reason for hiding this comment

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

added this because wasn't declared as dep

@@ -31,3 +39,4 @@ markers = [

[tool.black]
line-length = 79
target-version = ["py38"]

Choose a reason for hiding this comment

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

this isn't required, black will infer it from the requires-python value

see https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#t-target-version

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.

2 participants