cool-RR / PySnooper

Never use print for debugging again
MIT License
16.31k stars 954 forks source link

Add pyproject.toml and switch setup.py to setup.cfg #228

Closed frenzymadness closed 1 year ago

frenzymadness commented 1 year ago

I've prepared pyproject.toml config because it allows build tools to detect that this project depends on setuptools and prepare a build environment for it. Also, setup.cfg looks clearer than setup.py.

cool-RR commented 1 year ago

Thanks. I want you to confirm that everything will work exactly like before with this change. Creating source distributions, wheels, running tests, everything. I want to be sure that the wheels / source distributions are almost identical, and wherever they're not identical, it's in a way that doesn't hurt anything.

Can you confirm that all of these things are true and show shell output demonstrating all of these things?

(Sorry that I'm putting all this work on you, PySnooper pull requests are a low priority for me and these kind of changes tend to be dangerous.)

frenzymadness commented 1 year ago

I solved the conflict and I'm providing the requested info. I've created sdist and wheel in master branch via python setup.py sdist and python setup.py bdist_wheel and then the same in this branch via python -m build -sw . and compared the result.

The following difference between the lists of files in tar.gz archives is expected:

$ diff old/tar_filelist new/tar_filelist
12a13
> PySnooper-1.1.1/pyproject.toml
22d22
< PySnooper-1.1.1/setup.py

The content of the zip files (wheels) are exactly the same:

Archive contains:
  pysnooper/__init__.py
  pysnooper/pycompat.py
  pysnooper/tracer.py
  pysnooper/utils.py
  pysnooper/variables.py
  PySnooper-1.1.1.dist-info/AUTHORS
  PySnooper-1.1.1.dist-info/LICENSE
  PySnooper-1.1.1.dist-info/METADATA
  PySnooper-1.1.1.dist-info/WHEEL
  PySnooper-1.1.1.dist-info/top_level.txt
  PySnooper-1.1.1.dist-info/RECORD
Total 11 entries (39639 bytes)
cool-RR commented 1 year ago

Excellent, thank you. This is ready for merging and release, right? (Modulo a version bump.)

frenzymadness commented 1 year ago

I'd say that this is ready for merging but there is no need for a new release given the fact that there should be no difference for users.

cool-RR commented 1 year ago

Sounds good. Thank you for this!