python - How to make setup.py copy data files and set environment variable to the installed data path -
i making python module (a wrapper c library) have data files needs installed package work (coefficients magnetic field model). additionally, after installation, enviroment variable needs set folder data files ended (or else c library won't work).
i think have managed install data files using manifest file , include_package_data=true
(the files correctly end in directory package installed, though if there better ways i'm ears). stuck on environment variable part.
- how can (in setup.py) directory package installed?
- how can reliably set permanent environment variable in setup.py across platforms?
- would possible work-around set environment variable @ runtime whenever package imported? find directory can use
__file__
in__init.py__
, work way there, , enviromnent variables don't have stick. however, i'm not sure c extension have access environment variable defined through python wrapper. it?
Comments
Post a Comment