I have a module that I want to keep abreast of, and I wonder if this is not bad:
Have a module (mod1.py) in the package sites directory that copies another module from some other packages in the package sites directory, and then import * from this module.
import shutil
from distutils.sysconfig import get_python_lib
p_source = r'\\SourceSafeServer\mod1_current.py'
p_local = get_python_lib() + r'\mod1_current.py'
shutil.copyfile(p_source, p_local)
from mod1_current import *
Now I can do this in any module, and it will always be the latest version:
from mod1 import function1
It works ... but is there a better way to do this?
Update
Here is the current process ... there is a project under the control of the source, which has one module: mod1.pyIn the directory of package sites there is also setup.pyRunning setup.pycopies mod1.py.
Developers who use the module must run setup.pyto update the module. Sometimes they do not and do not have the latest version of the problem.
, , , , setup.py