"How to package additional files under site-packages "
I used get_python_lib() for directory in data_files, and it seem to have worked.
Thanks for your assistance!
From: dieter <dieter at handshake.de>
Sent: Wednesday, March 6, 2019 12:15 PM
To: python-list at python.org
Subject: Re: "How to package additional files under site-packages "
Saba Kauser <skauser at rocketsoftware.com> writes:
> My package (ibm_db) has LICENSE, README.md and CHANGES files that I want to be available in the same location as my package is installed I.e under site-packages. However, with current setup.py https://github.com/ibmdb/python-ibmdb/blob/master/IBM_DB/ibm_db/setup.py, these files get installed under python install path.
> e.g: C:\Users\skauser\AppData\Local\Programs\Python\Python36\LICENSE
> I have specified them as:
> data_files = [ ('', ['./README.md']),
> ('', ['./CHANGES']),
> ('', ['./LICENSE']) ]
> package_data = package_data,
> data_files = data_files,
> include_package_data = True,
> cmdclass = cmd_class,
> Since the directory path is empty, these files get copied under current path of execution. However, I want them to be copied under the install location of my package.
> Is there any other way I can achieve this?
As you do not want to follow my example, maybe read the "setuptools" documentation.
There definitely is a way to achieve your goal -- other than my approach. If necessary override parts of the "distutils/setuptools"
Rocket Software, Inc. and subsidiaries ? 77 Fourth Avenue, Waltham MA 02451 ? Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences
This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you.