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

Updated packaging to use pyproject.toml and Flit. #1589

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

deronnax
Copy link
Contributor

@deronnax deronnax commented Jul 3, 2023

Because setup.py is deprecated and setup.cfg is one step toward pyprojects.toml.

@deronnax
Copy link
Contributor Author

@carltongibson can I have a workflow run please?

@carltongibson
Copy link
Owner

It's all pyproject.toml these days no?
🤔

I've been using Flit on other projects, and will likely move to that at some point.

@deronnax
Copy link
Contributor Author

there you go. The flit build seems broken though:

 flit build                                                                                                                                                                                                             k3d-mycluster
Traceback (most recent call last):
  File "/Users/mathieu/.local/bin/flit", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/mathieu/.local/pipx/venvs/flit/lib/python3.11/site-packages/flit/__init__.py", line 191, in main
    main(args.ini_file, formats=set(args.format or []),
  File "/Users/mathieu/.local/pipx/venvs/flit/lib/python3.11/site-packages/flit/build.py", line 45, in main
    sb = SdistBuilder.from_ini_path(ini_file, use_vcs=use_vcs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mathieu/.local/pipx/venvs/flit/lib/python3.11/site-packages/flit/sdist.py", line 163, in from_ini_path
    inst = super().from_ini_path(ini_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mathieu/.local/pipx/venvs/flit/lib/python3.11/site-packages/flit_core/sdist.py", line 92, in from_ini_path
    module = common.Module(ini_info.module, srcdir)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mathieu/.local/pipx/venvs/flit/lib/python3.11/site-packages/flit_core/common.py", line 59, in __init__
    raise ValueError("No file/folder found for module {}".format(name))
ValueError: No file/folder found for module django_filter

python -m build works, nevertheless

@deronnax
Copy link
Contributor Author

Hmmm OK we were affected by this particularity of flit, I got it fixed.
We are good to go :)

@deronnax
Copy link
Contributor Author

deronnax commented Aug 2, 2023

@carltongibson can I have a workflow run please?

@carltongibson
Copy link
Owner

@deronnax Thanks for this. Just so you know, life is pretty full-on right now, so I will likely be a week or so to get to this. Thanks!

@deronnax
Copy link
Contributor Author

deronnax commented Aug 2, 2023

OK. I go in holiday for 2 tweeks next Friday, so I won't bother you too much. Btw, I think it is ready to be merged, but you do you :)

@deronnax
Copy link
Contributor Author

let's merge :) ?

@carltongibson
Copy link
Owner

Nearly to it @deronnax. Thanks. 🙏

@codecov-commenter
Copy link

codecov-commenter commented Aug 31, 2023

Codecov Report

Merging #1589 (b3f2577) into main (1268b0f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1589   +/-   ##
=======================================
  Coverage   98.58%   98.58%           
=======================================
  Files          15       15           
  Lines        1271     1271           
=======================================
  Hits         1253     1253           
  Misses         18       18           

deronnax and others added 2 commits August 31, 2023 17:42
Copy link
Owner

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

Hi @deronnax Thanks for this. Really great. I pushed some edits, squashed, rebased, and added an extra workaround for #1605 (unrelated).

🎁

@carltongibson carltongibson changed the title migrate setup.py to setup.cfg Updated packaging to use pyproject.toml and Flit. Aug 31, 2023
@carltongibson carltongibson merged commit e5fc05d into carltongibson:main Aug 31, 2023
7 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

3 participants