6

Using setuptools of Python, is it possible to specify the output directory when I install a python project ?

In my project directory:

python setup.py install

I would like to install the project into the /usr/share/myproject/ directory for example.

I don't want to specify the output directory in my command line. I'd like to specify this output directory into the setup.py.

Sandro Munda
  • 39,921
  • 24
  • 98
  • 123
  • 1
    If you can do it on the command-line, you should be able to preprocess `sys.argv` before setuptools runs. – mgilson Jun 19 '12 at 12:22
  • I can do it with easy_install for example (-d) but I don't know with another tool. – Sandro Munda Jun 19 '12 at 12:23
  • 1
    `--prefix` should work (just as it would for a standard unix configure). e.g. `python setup.py install --prefix=/usr/share/` – mgilson Jun 19 '12 at 12:29

0 Answers0