5

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.

1 Answer 1

5

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.