pythonpackagesetuptoolssdist

Output directories for python setup.py sdist bdist_wheel


When doing

python setup.py sdist bdist_wheel

it creates build, dist, packagename.egg-info directories. I'd like to have them out of the current folder.

I tried:

Question: how to have everything (the output of sdist and bdist_wheel) outside of the current folder?

Of course I can write a script with mv, rm -r, etc. but I wanted to know if there exists a built-in solution.


Solution

  • I tried some time again with -d, --dist-dir, --bdist-dir but I found no way to do it in one-line.

    I'm afraid the shortest we could find (on Windows) is:

    python setup.py sdist bdist_wheel
    rmdir /s /q packagename.egg-info build ..\dist
    move dist ..