Commit Graph

28 Commits

Author SHA1 Message Date
Mizux Seiha
c84eb033c9 Python: Cleanup setup.py 2020-05-16 13:01:07 +02:00
Mizux Seiha
196871adee deps: protobuf still don't provide a 3.11.4 package
note: to revert once Protobuf team release it !
2020-04-29 09:58:23 +02:00
Mizux Seiha
b903560395 cmake: Fix SWIG_FLAGS when enabling several languages 2020-04-10 11:51:30 +02:00
Corentin Le Molgat
506ebe9679 Cmake: Update Proto comment 2020-03-05 08:43:45 +01:00
Corentin Le Molgat
56f21f5a4e CMake: update foreach 2020-03-02 17:23:34 +01:00
Corentin Le Molgat
4c7456b175 CMake: Update Python support
* Add define SWIGWORDSIZE64 on Linux
* Add -doxygen option
* add ortools/util/python
* Move python generated stuff to BINARY_DIR/python
* Bump CMake >= 3.14 as requirement
  * SWIG module rework from 3.9 to 3.14
  * Python module rework in 3.12
* Drop Python 2.7 support (like in Makefile)
* Fix clean target
  * OUTPUT/BYPRODUCTS path are relative to CURRENT_BINARY_DIR not WORKING_DIR
* Fix ortools package install in virtualenv
* Clean target now remove the <build>/venv directory
2020-02-28 08:21:27 +01:00
Corentin Le Molgat
fd4ce1131c CMake: Update wrapper support 2020-02-14 11:12:44 +01:00
Corentin Le Molgat
d6fe894136 CMake: Fix python build 2020-02-11 14:41:16 +01:00
Corentin Le Molgat
f9cb28a370 CMake: allow python3.8 support 2020-02-07 15:39:26 +01:00
Mizux
ef779c4101 Update python.cmake
Add *.pyi file to archive if any...
2020-01-16 15:43:41 +01:00
Corentin Le Molgat
a49b9143a4 Rework CMake dependencies management (Fix #1116)
- By default don't build dependencies simply call find_package()
- By default only build C++ library
- IF building Python, Java or .Net wrapper then force build dependencies
  - Build dependencies as STATIC
  - Build and Install (in CMAKE_BINARY_DIR) dependencies at configure time
2019-04-11 13:47:05 +02:00
Corentin Le Molgat
b88298edd3 Remove tab from CMakeLists.txt
- Mandatory to follow google internal convention
2018-11-13 09:21:53 +01:00
Corentin Le Molgat
ed47e1f70d CMake: copy libortools to .libs in pyhon package 2018-08-16 15:59:11 +02:00
Laurent Perron
b5b8a34e10 fix cmake 2018-07-25 11:43:29 -07:00
Corentin Le Molgat
99d4d0ad54 Support python 3.7 on MacOS
- MacOS brew just bump to python 3.7
- Bump make 3.81 -> 4.2.1 on MacOS Travis CI
- Ubuntu CI use python3.6
2018-07-03 09:56:07 +02:00
Corentin Le Molgat
ad825e4096 CMake: fix wheel platlib/purelib missmatch (Fix #618) 2018-03-26 11:49:55 +02:00
Corentin Le Molgat
658ad5210e CMake: install missing package in user
- will avoid permission issue
2018-03-26 11:49:55 +02:00
Corentin Le Molgat
9a8e8fb6be search python module, and install it if needed 2018-02-06 14:16:37 +01:00
Corentin Le Molgat
a5542dc5cc Python unix wrapper only depend on ortools soname 2018-01-22 16:56:21 +01:00
Corentin Le Molgat
eea490583d Only create test if virtualenv module found 2018-01-22 16:55:40 +01:00
Corentin Le Molgat
8b222ebec2 Only create wheel package if wheel module found 2018-01-22 16:55:15 +01:00
Corentin Le Molgat
8bd5acee1a Add Test & Examples
Tests:
- Add cc test
- Add python test

Examples:
- Add examples/cpp
- Add examples/data
- Add examples/notebook
- Add examples/python

Signed-off-by: Corentin Le Molgat <corentinl@google.com>
2018-01-19 15:03:25 +01:00
Corentin Le Molgat
6856567eda Rework CMakeLists.txt
Dependencies:
- Add dependencies as subprojects instead of prebuild (aka imported target)
- add zlib project
- Use Cbc as CMake subproject instead of prebuilt
- Add log between each subproject
- Force gflags namespace to gflags

Or-tools:
- Rework python.cmake support
- Fix missing ortool.util in python (#558)
- Try to use static library for ortools::proto
pros: can use target_link_libraries to get includes etc...
cons: lot of symbols undefined since libortools.so will strip everything -_-
- Use add_library(XXX OBJECT) for ortools/*
- fix get version from git when using small depth copy
- Create Install rule for ortools
- Don't create export rules
note: since we use subprojects instead of Imported Target,
ortools export complained against target deps "that is not in the export set."

Update windows support
- add swig project
- Protobuf force the use of /MD instead of /MT
- or-tools use /MD by default
- Add missing ws2_32
- Add missing psapi
- Update windows disable warnings list
- Build Static or-tools on Windows
- fix windows export symbols leak issue

Signed-off-by: Corentin Le Molgat <corentinl@google.com>
2018-01-19 15:03:25 +01:00
Amit Prakash Ambasta
b11536c04f Hardcoded include paths for python setup.py for now 2017-07-03 18:29:44 +05:30
Amit Prakash Ambasta
0737f36cc4 Do not invoke setup.py build module via cmake but just build the src tarball for python, added manifest to ship additional swig include files 2017-07-03 17:57:58 +05:30
Amit Prakash Ambasta
31863e4dda Added flags to force rebuild of all dependencies, created hierarchy b/w python and C++ projects when the C++ project is being built 2017-07-03 15:42:24 +05:30
Amit Prakash Ambasta
341fb1c98a Added __init__.py missing in ortools python subdirs 2017-06-28 16:17:25 +05:30
Amit Prakash Ambasta
97d581dd9e Added support to build python 2017-06-28 15:45:56 +05:30