3

I am new to python and am figuring out and using distutils to create a distribution for a python project,

in the setup.py file you indicate which python modules to be included with the option

py_modules = ['mod1', 'pkg.mod2']

which would include the files under the distribution root 'mod1' and also can include files in packages within the distribution root 'pkg/mod2'. Is it possible to include files above the distribution root folder?
for example a python module found several directories above:../../../../../pkg2/mod3

or must I go about changing the distribution root?

Thanks,

1 Answer 1

0

You can use package_dir for this.

setup(
    package_dir={'mod3': '../../../../../pkg2/mod3'},
    packages=['mod3']
)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .