-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
68 lines (64 loc) · 3.54 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"""
This file instructs scitkit-build how to build the module. This is very close
to the classical setuptools, but wraps some things for us to build the native
modules easier and more reliable.
For a proper installation with `pip install .`, you additionally need a
`pyproject.toml` to specify the dependencies to load this `setup.py`.
You can use `python3 setup.py install` to build and install the package
locally, with verbose output. To build this package in place, which may be
useful for debugging, use `python3 setup.py develop`. This will build
the native modules and move them into your source folder.
The setup options are documented here:
https://scikit-build.readthedocs.io/en/latest/usage.html#setup-options
"""
from setuptools import find_packages
from skbuild_conan import setup
setup( # https://scikit-build.readthedocs.io/en/latest/usage.html#setup-options
# ~~~~~~~~~ BASIC INFORMATION ~~~~~~~~~~~
name="cetsp-bnb2",
version="0.3.0", # TODO: Use better approach for managing version number.
# ~~~~~~~~~~~~ CRITICAL PYTHON SETUP ~~~~~~~~~~~~~~~~~~~
# This project structures defines the python packages in a subfolder.
# Thus, we have to collect this subfolder and define it as root.
packages=find_packages("pysrc"), # Include all packages in `./python`.
package_dir={"": "pysrc"}, # The root for our python package is in `./python`.
python_requires=">=3.7", # lowest python version supported.
install_requires=[
# requirements necessary for basic usage (subset of requirements.txt)
"chardet>=4.0.0",
"networkx>=2.5.1",
"requests>=2.25.1",
# "pyconcorde", # this package is problematic and you may need to install it manually
],
# ~~~~~~~~~~~ CRITICAL CMAKE SETUP ~~~~~~~~~~~~~~~~~~~~~
# Especially LTS systems often have very old CMake version (or none at all).
# Defining this will automatically install locally a working version.
cmake_minimum_required_version="3.23",
#
# By default, the `install` target is built (automatically provided).
# To compile a specific target, use the following line.
# Alternatively, you can use `if(NOT SKBUILD) ... endif()` in CMake, to
# remove unneeded parts for packaging (like tests).
# cmake_install_target = "install"
#
# In the cmake you defined by install(...) where to move the built target.
# This is critical als only targets with install will be used by skbuild.
# This should be relative paths to the project root, as you don't know
# where the package will be packaged. You can change the root for the
# install-paths with the following line. Note that you can also access
# the installation root (including this modification) in cmake via
# `CMAKE_INSTALL_PREFIX`. If your package misses some binaries, you
# probably messed something up here or in the `install(...)` path.
# cmake_install_dir = ".",
# |-----------------------------------------------------------------------|
# | If you are packing foreign code/bindings, look out if they do install |
# | targets in global paths, like /usr/libs/. This could be a problem. |
# |-----------------------------------------------------------------------|
#
# Some CMake-projects allow you to configure it using parameters. You
# can specify them for this Python-package using the following line.
# cmake_args=[]
# There are further options, but you should be fine with these above.
# ~~~~~~~~ Conan ~~~~~~~~~~~~~
conan_recipes=["./cmake/conan/gurobi_public/", "./cmake/conan/cgal_custom"],
)