Monday 30 August 2021

How can I configure my python package to copy files to a subfolder of scripts post installation

I have a python package that comes with a variety of scripts in other languages. Setuptools already supports copying these scripts into the scripts directory of the environment to make them accessible from the command line. For this purpose I can simply use the following keyword in the setup commmand:

setup(
    ...
    scripts=["bin/script1.bat", "bin/script2.bat"],
    ...
    )

After installing the package, the script files will end up correctly in the scripts folder of the environment.

My question: Is there a way to have these files end up in a subfolder of the scripts directory? Something like scripts/odd_scripts/script1.bat and scripts/even_scripts/script2.bat.



from How can I configure my python package to copy files to a subfolder of scripts post installation

No comments:

Post a Comment