carltongibson / django-filter

A generic system for filtering Django QuerySets based on user selections
https://django-filter.readthedocs.io/en/main/
Other
4.41k stars 766 forks source link

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

Closed deronnax closed 1 year ago

deronnax commented 1 year ago

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

deronnax commented 1 year ago

@carltongibson can I have a workflow run please?

carltongibson commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

deronnax commented 1 year ago

@carltongibson can I have a workflow run please?

carltongibson commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

let's merge :) ?

carltongibson commented 1 year ago

Nearly to it @deronnax. Thanks. 🙏

codecov-commenter commented 1 year ago

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