dtrx-py / dtrx

Do The Right Extraction
GNU General Public License v3.0
224 stars 10 forks source link

Why require twine? #19

Closed ryandesign closed 2 years ago

ryandesign commented 2 years ago

When I try to build dtrx without having twine installed, I get:

* Getting dependencies for wheel...

ERROR Missing dependencies:
    twine>=1.11.0

Why does dtrx require twine? This was added in 24eeff44664bfb18343bbdd34e09db3265c28b7d "to enable upload" according to the commit message, but I'm not trying to upload anything.

As I understand it, dtrx is a utility to extract archives and twine is a utility to upload things to pypi. It doesn't seem like dtrx should need twine.

There are no occurrences of "twine" in the source code except in setup_requires in setup.py. If I remove the mention of twine there, it builds fine without twine.

--- setup.py.orig   2021-09-15 15:45:01.000000000 -0500
+++ setup.py    2022-01-07 16:28:35.000000000 -0600
@@ -70,6 +70,6 @@
     long_description_content_type="text/markdown",
     # using markdown as pypi description:
     # https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypi
-    setup_requires=["setuptools>=38.6.0", "wheel>=0.31.0", "twine>=1.11.0"],
+    setup_requires=["setuptools>=38.6.0", "wheel>=0.31.0"],
     install_requires=install_requires,
noahp commented 2 years ago

Thanks for filing this ticket @ryandesign !

twine is specified as a dependency there just as a convenience; to upload a project with a markdown-based README (long_description) requires a specific minimum twine version:

https://dustingram.com/articles/2018/03/16/markdown-descriptions-on-pypi/#5-upgrade-your-twine

I'm thinking of migrating this package to poetry to simplify the build system, but not sure it's worth it.

FWIW, this is the command I use to build the package, which should just install twine into ./.eggs for the build:

❯ python setup.py bdist_wheel