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.

  1. how can (in setup.py) directory package installed?
  2. how can reliably set permanent environment variable in setup.py across platforms?
  3. 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

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -