2

How to install my packages to alternative directory (ex. /opt/myapp) instead of the usual third party python path ??

tabebqena
  • 1,204
  • 1
  • 13
  • 23
  • http://stackoverflow.com/questions/273192/create-directory-if-it-doesnt-exist-for-file-write?rq=1 -- does this discussion answer your question? – vpit3833 Nov 17 '13 at 23:55
  • thanks for your time , the answer is "no" , I expect that the script should create this directories and copy the modules into it. – tabebqena Nov 18 '13 at 00:11
  • Please read the documentation of package_dir. package_dir is not the destination. Package_dir is to tell distutils where your packages are in your source tree. – Kenji Noguchi Nov 18 '13 at 00:44
  • thanks for notification , I read it quickly , so I wrongly understand it , what is the option for distination directory ?? – tabebqena Nov 18 '13 at 02:03

1 Answers1

3

I have found this way which is accepted for me :

1/ Make setup configuration file .

2/ Add the following to the configuration file :

[install]
install-base=    # custom path
install-purelib= # custom path
install-platlib= # add custom path
install-scripts=  # add custom path
install-data=      # add custom path 
install-headers=    #add custom path 

this is better than force the user to specify them in the command line, in addition he can override this conf. from the command line . It works fine for me .

Community
  • 1
  • 1
tabebqena
  • 1,204
  • 1
  • 13
  • 23