-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Improve Python bindings packaging
- Loading branch information
1 parent
3c1eae7
commit 74a3fc2
Showing
6 changed files
with
98 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
################################################################################################################################################################ | ||
|
||
# @project Library/Mathematics | ||
# @file requirements.txt | ||
# @author Lucas Brémond <[email protected]> | ||
# @license Apache License 2.0 | ||
|
||
################################################################################################################################################################ | ||
|
||
numpy | ||
LibraryCorePy>=0.2.0 | ||
|
||
################################################################################################################################################################ |
15 changes: 14 additions & 1 deletion
15
bindings/python/tools/python/Library/Mathematics/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
from .LibraryMathematicsPy import * | ||
################################################################################################################################################################ | ||
|
||
# @project Library/Mathematics | ||
# @file Library/Mathematics/__init__.py | ||
# @author Lucas Brémond <[email protected]> | ||
# @license Apache License 2.0 | ||
|
||
################################################################################################################################################################ | ||
|
||
from Library.Core import * | ||
|
||
from .LibraryMathematicsPy import * | ||
|
||
################################################################################################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
################################################################################################################################################################ | ||
|
||
# @project Library | ||
# @file Library/__init__.py | ||
# @author Lucas Brémond <[email protected]> | ||
# @license Apache License 2.0 | ||
|
||
################################################################################################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,45 @@ | ||
################################################################################################################################################################ | ||
|
||
# @project Library/Mathematics | ||
# @file tools/python/setup.py.in | ||
# @author Lucas Brémond <[email protected]> | ||
# @license Apache License 2.0 | ||
|
||
################################################################################################################################################################ | ||
|
||
import setuptools | ||
|
||
with open("${CMAKE_CURRENT_SOURCE_DIR}/README.md", "r") as fh: | ||
with open('${CMAKE_CURRENT_SOURCE_DIR}/README.md', 'r') as fh: | ||
long_description = fh.read() | ||
|
||
with open('${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt', 'r') as f: | ||
requirements = f.read().splitlines() | ||
|
||
setuptools.setup( | ||
name="LibraryMathematicsPy", | ||
version="${PROJECT_VERSION_STRING}", | ||
author="Open Space Collective", | ||
author_email="[email protected]", | ||
description="Fundamental types, containers and utilities.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url = "https://github.com/open-space-collective/library-mathematics", | ||
classifiers=( | ||
"Development Status :: 3 - Alpha", | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: POSIX :: Linux" | ||
name = 'LibraryMathematicsPy', | ||
version = '${PROJECT_VERSION_STRING}', | ||
author = 'Open Space Collective', | ||
author_email = '[email protected]', | ||
description = 'Geometry, curve fitting, optimization.', | ||
long_description = long_description, | ||
long_description_content_type = 'text/markdown', | ||
url = 'https://github.com/open-space-collective/library-mathematics', | ||
classifiers = ( | ||
'Development Status :: 3 - Alpha', | ||
'Programming Language :: Python :: 3', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Operating System :: POSIX :: Linux' | ||
), | ||
keywords="open-space-collective mathematics", | ||
packages=setuptools.find_packages(), | ||
package_data={"": ["${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_PATH}/LibraryMathematicsPy.so", "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_PATH}/liblibrary-mathematics.so.0", "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_PATH}/libboost_python36.so.1.68.0", "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_PATH}/libboost_numpy36.so.1.68.0"]} | ||
) | ||
keywords = 'open-space-collective library mathematics', | ||
packages = setuptools.find_packages(), | ||
package_data = { | ||
'': [ | ||
'${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_PATH}/LibraryMathematicsPy.so', | ||
'${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_PATH}/liblibrary-mathematics.so.0', | ||
'${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_PATH}/libboost_numpy36.so.1.68.0' | ||
] | ||
}, | ||
install_requires = requirements | ||
) | ||
|
||
################################################################################################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters