PFython / cleverdict

A JSON-friendly data structure which allows both object attributes and dictionary keys and values to be used simultaneously and interchangeably.
MIT License
102 stars 9 forks source link

Packaging with setup.cfg #39

Closed eggplants closed 2 years ago

eggplants commented 2 years ago

I moved package data from complex setup.py to setup.cfg, and also moved versioning information from setup.py to cleverdict/__init__.py.

PFython commented 2 years ago

Many thanks for this @eggplants. Contributions always very welcome!

I need to have a proper look at this and another Pull request in the next week or two to make sure I'm merging them properly.

I may have to be selective with your suggested config changes because these setup.py etc are automatically generated by another script which makes publishing to PyPI so much easier for me. It may be that these changes can be ported to https://github.com/PFython/easypypi so if you have a free 20 minutes to have a quick look that would be awsome, thank you!

eggplants commented 2 years ago

Since easypypi/setup.py is a sample of easypypi, I am wondering if I can modify it. Or do you want me to change easypypi's method for generating the setup file?

(Of course, it would be good to write everything in setup.py,) I personally think all package metadata and some tool configurations should be managed in setup.cfg (+pyproject.toml, e.g. poetry), rather than setup.py. So it would be useful if easypypi had an option to generate a setup.cfg, and I would like to try to implement that in my spare time.

PFython commented 2 years ago

Since easypypi/setup.py is a sample of easypypi, I am wondering if I can modify it. Or do you want me to change easypypi's method for generating the setup file?

(Of course, it would be good to write everything in setup.py,) I personally think all package metadata and some tool configurations should be managed in setup.cfg (+pyproject.toml, e.g. poetry), rather than setup.py. So it would be useful if easypypi had an option to generate a setup.cfg, and I would like to try to implement that in my spare time.

That would be amazing if you have any spare time thanks @eggplants. I don't claim to understand best practices for package configuration/setup and have just focussed so far on getting something that works and saves time, so if you know of a better way or can offer an option to choose between setup.py and setup.cfg that would be brilliant (and hopefully also give you a tool you can use which does things in the exact way you prefer). Can't wait to see what you come up with!