Is there way to get the path of the tar file that setup.py sdist
built? I know where it is, but I'm looking to script it without having to ls dist/
etc. I'm ok to override the command too if theres a variable that distutils assigns it too, or a function that will return it.
It looks like you can do:
python setup.py sdist --formats=gztar
FNAME=dist/`python setup.py --fullname`.tar.gz
echo $FNAME
Using the formats parameter to ensure that the file is going to be tar.gz Have checked this script on a setup.py with setup from setuptools. Should work with distutils too. You can override the dist folder, have a look at:
python setup.py sdist --help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.