galaxyproject / galaxyproject/starforge

sdist command packages the setup.py wrapper

Open
#181 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
8
Forks
16
PR merge metrics
No merged PRs in 30d

Description

For packages that use `insert_setuptools`, `starforge sdist` causes the sdist to contain the `setup.py` wrapper rather than the distribution's `setup.py`. This resulted in some invalid tarballs on wheels.galaxyproject.org (see #180).

Rather than mess with files, we might be able to just:

```sh-session
$ python -c 'import setuptools; __file__ = "setup.py"; exec(compile(open("setup.py").read(), "setup.py", "exec"))' bdist_wheel
```

I tested this by hand with the upstream Markdown 2.6.3 sdist and it works. More complex setup scripts might have issues.

Once working, there would probably be no harm in running all sdist and wheel builds this way by default. This would be easily done by changing the implicit default of `insert_setuptools` from `false` to `true`, and running a traditional `python setup.py bdist_wheel` if `insert_setuptools` is *explicitly* set to `false` for a particular wheel.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.