argcomplete icon indicating copy to clipboard operation
argcomplete copied to clipboard

Migrate to pyproject.toml

Open kislyuk opened this issue 3 years ago • 5 comments

Once that is done, add build to the build dependencies in pyproject.toml.

kislyuk avatar Nov 08 '21 15:11 kislyuk

@kislyuk This is somewhat separate:

  • Are you open for a PR with just the pyproject.toml (PEP 518, PEP 621)? (and an option to use flit / whatever system in the future?)

    I am not familiar with flit best practices, but can do the pyproject.toml part.

    Example I have: https://github.com/thisch/pytest-sphinx/pull/41/files

  • More heavy duty:

    • Would you like to try hatch (https://github.com/pypa/hatch)? Maintained by PyPA, has a hatch shell command? I heard about it today and it looks promising. I can try it in a separate PR if you'd like

      P.S. I haven't tried hatch before, I use poetry 1.2 on all my projects (and it's very mature at this stage)

tony avatar Oct 17 '22 01:10 tony

Thanks for the offer. I'm open to a PR for migrating setup.py contents to pyproject.toml, but not to hatch.

kislyuk avatar Mar 19 '23 09:03 kislyuk

Hi @kislyuk !

This looked like the ball was dropped on so I picked it up :)

I took a look at using the regular setuptools for migration to pure pyproject.toml as it's the one already used.
Here are things that I noted looking at a possible migration:

  1. pyproject.toml setuptools is still in beta. (guess this is because of all the legacy it has)
  2. setup.py scripts has been deprecated and project.scripts in pyproject.toml is recommended as the migration path (entry_points instead of stand alone scripts)
  3. setup.py url is deprecated in pyproject.toml and use of project.urls seems to be encouraged. This one has impact on pip show as Home-page will be missing (Beta things I guess).
  4. Are the setup.cfg bdist_rpm used? Latest RPM release I find is 1.8.1. This makes me believe that this is not used anymore.

Thanks for this awesome project!

halfow avatar May 14 '23 21:05 halfow

Hi @halfow , I left a review in the PR. To your other questions-

  • We will not be setting any setuptools build settings or any other build tool settings in pyproject.toml for now. The beta restriction is very apt - in my experience, storing build settings in pyproject.toml is just not stable enough to be reliable for now.
  • We will not be moving away from setuptools scripts for now
  • We will not be removing any currently present fields marked as "deprecated" for now
  • I'm not certain whether bdist_rpm is actively being used, but I'm not ready to remove it at this time.

kislyuk avatar May 15 '23 01:05 kislyuk

Thank you for the clarification and answers :)

I will update accordingly.

halfow avatar May 15 '23 06:05 halfow