Jan-12-2018, 02:17 AM
I am attempting to write a setup.py file for a python package that is created by compiling C++ code wrapped using SWIG. I currently have the directory structure,
Any help would be most welcome.
Cameron Devine
├── CoreRobotics.py ├── _CoreRobotics.so ├── MANIFEST.in ├── setup.cfg └── setup.pyMy setup.py file is,
from setuptools import setup from glob import glob setup( name = 'CoreRobotics', version = '0.9.1', description = 'CoreRobotics: An object-oriented library for cross-platform robot control', url = 'http://www.corerobotics.org/', author = 'Parker Owen', author_email = '[email protected]', keywords = 'robotics kinematics', py_modules = ['CoreRobotics'], package_data = {'CoreRobotics': ['_CoreRobotics.*']}, #data_files = [('', glob('_CoreRobotics.*'))], #include_package_data = True, install_requires = ['numpy'])setup.cfg is currently empty, and MANIFEST.in has the single line,
include _CoreRobotics.*This creates a wheel file with the following files,
Archive: dist/CoreRobotics-0.9.1-py2-none-any.whl
Length Date Time Name
--------- ---------- ----- ----
54528 2018-01-11 19:43 CoreRobotics.py
10 2018-01-12 02:12 CoreRobotics-0.9.1.dist-info/DESCRIPTION.rst
1672 2018-01-12 02:12 CoreRobotics-0.9.1.dist-info/metadata.json
13 2018-01-12 02:12 CoreRobotics-0.9.1.dist-info/top_level.txt
92 2018-01-12 02:12 CoreRobotics-0.9.1.dist-info/WHEEL
1698 2018-01-12 02:12 CoreRobotics-0.9.1.dist-info/METADATA
596 2018-01-12 02:12 CoreRobotics-0.9.1.dist-info/RECORD
--------- -------
58609 7 filesI have tried using the commented out data_files line to include the shared library, but this does not put the shared library in the same location as the CoreRobotics.py file. I have also tried setting include_package_data to true, but this also does not work.Any help would be most welcome.
Cameron Devine
