pygmo 2.19.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygmo2/.circleci/config.yml +45 -0
- pygmo2/.clang-format +61 -0
- pygmo2/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- pygmo2/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- pygmo2/.github/workflows/main.yml +100 -0
- pygmo2/.gitignore +21 -0
- pygmo2/.travis.yml +19 -0
- pygmo2/CMakeLists.txt +159 -0
- pygmo2/LICENSE +373 -0
- pygmo2/PKG-INFO +20 -0
- pygmo2/README.md +50 -0
- pygmo2/cmake/PygmoFindBoost.cmake +34 -0
- pygmo2/cmake/yacma/LICENSE +21 -0
- pygmo2/cmake/yacma/README.md +3 -0
- pygmo2/cmake/yacma/YACMACompilerLinkerSettings.cmake +207 -0
- pygmo2/cmake/yacma/YACMAPythonSetup.cmake +146 -0
- pygmo2/cmake/yacma/YACMAThreadingSetup.cmake +60 -0
- pygmo2/doc/Makefile +20 -0
- pygmo2/doc/algorithm.rst +7 -0
- pygmo2/doc/algorithms.rst +133 -0
- pygmo2/doc/api_reference.rst +45 -0
- pygmo2/doc/archipelago.rst +7 -0
- pygmo2/doc/bfe.rst +6 -0
- pygmo2/doc/bfes.rst +31 -0
- pygmo2/doc/changelog.rst +164 -0
- pygmo2/doc/con_utils.rst +8 -0
- pygmo2/doc/conf.py.in +106 -0
- pygmo2/doc/credits.rst +45 -0
- pygmo2/doc/generic_utils.rst +12 -0
- pygmo2/doc/genetic_op_utils.rst +8 -0
- pygmo2/doc/gh_utils.rst +12 -0
- pygmo2/doc/hv_utils.rst +30 -0
- pygmo2/doc/images/algo.png +0 -0
- pygmo2/doc/images/algo_no_text.png +0 -0
- pygmo2/doc/images/archi.png +0 -0
- pygmo2/doc/images/archi_no_text.png +0 -0
- pygmo2/doc/images/cec2013_10_cmaes.png +0 -0
- pygmo2/doc/images/cec2013_10_jde.png +0 -0
- pygmo2/doc/images/cec2013_2_cmaes.png +0 -0
- pygmo2/doc/images/cec2013_2_jde.png +0 -0
- pygmo2/doc/images/cec2013_2_pso.png +0 -0
- pygmo2/doc/images/cec2013_2_sa.png +0 -0
- pygmo2/doc/images/cmaes_vs_xnes1.png +0 -0
- pygmo2/doc/images/cmaes_vs_xnes2.png +0 -0
- pygmo2/doc/images/cmaes_vs_xnes3.png +0 -0
- pygmo2/doc/images/cmaes_vs_xnes4.png +0 -0
- pygmo2/doc/images/cmaes_vs_xnes5.png +0 -0
- pygmo2/doc/images/cmaes_vs_xnes6.png +0 -0
- pygmo2/doc/images/dow.png +0 -0
- pygmo2/doc/images/esa.png +0 -0
- pygmo2/doc/images/google.png +0 -0
- pygmo2/doc/images/hv_MAX_compute_runtime_plot.png +0 -0
- pygmo2/doc/images/hv_MAX_lc_runtime_plot.png +0 -0
- pygmo2/doc/images/hv_compute_runtime_plot.png +0 -0
- pygmo2/doc/images/hv_fpras.png +0 -0
- pygmo2/doc/images/hv_front_2d_simple.png +0 -0
- pygmo2/doc/images/hv_lc_runtime_plot.png +0 -0
- pygmo2/doc/images/hv_wfg_hv3d.png +0 -0
- pygmo2/doc/images/hypervolume.png +0 -0
- pygmo2/doc/images/island.png +0 -0
- pygmo2/doc/images/island_no_text.png +0 -0
- pygmo2/doc/images/logo_favico.ico +0 -0
- pygmo2/doc/images/migration.png +0 -0
- pygmo2/doc/images/mo_dtlz_moead_array.png +0 -0
- pygmo2/doc/images/mo_dtlz_moead_grid_tch.png +0 -0
- pygmo2/doc/images/mo_zdt1_moead_ndf.png +0 -0
- pygmo2/doc/images/mo_zdt1_rnd_ndf.png +0 -0
- pygmo2/doc/images/nlopt_basic_lv1.png +0 -0
- pygmo2/doc/images/pop.png +0 -0
- pygmo2/doc/images/pop_no_text.png +0 -0
- pygmo2/doc/images/prob.png +0 -0
- pygmo2/doc/images/prob_no_text.png +0 -0
- pygmo2/doc/images/ros_10_on_16_isl.png +0 -0
- pygmo2/doc/images/sa_schwefel_20.png +0 -0
- pygmo2/doc/images/sade_CR_over_rosenbrock_10.png +0 -0
- pygmo2/doc/images/sade_rosenbrock_10.png +0 -0
- pygmo2/doc/images/schwefel_20.png +0 -0
- pygmo2/doc/images/sea_schwefel_20.png +0 -0
- pygmo2/doc/images/tutorial_cec2006.png +0 -0
- pygmo2/doc/images/tutorial_maco_zdt3.png +0 -0
- pygmo2/doc/index.rst +62 -0
- pygmo2/doc/install.rst +216 -0
- pygmo2/doc/island.rst +7 -0
- pygmo2/doc/islands.rst +21 -0
- pygmo2/doc/known_issues.rst +14 -0
- pygmo2/doc/make.bat +35 -0
- pygmo2/doc/misc.rst +22 -0
- pygmo2/doc/mo_utils.rst +40 -0
- pygmo2/doc/overview.rst +276 -0
- pygmo2/doc/plotting.rst +4 -0
- pygmo2/doc/population.rst +7 -0
- pygmo2/doc/problem.rst +7 -0
- pygmo2/doc/problems.rst +128 -0
- pygmo2/doc/r_policies.rst +12 -0
- pygmo2/doc/r_policy.rst +6 -0
- pygmo2/doc/s_policies.rst +12 -0
- pygmo2/doc/s_policy.rst +6 -0
- pygmo2/doc/topologies.rst +27 -0
- pygmo2/doc/topology.rst +6 -0
- pygmo2/doc/tutorials/cec2006_gaco_benchmark.rst +143 -0
- pygmo2/doc/tutorials/cec2013_comp.rst +122 -0
- pygmo2/doc/tutorials/cmaes_vs_xnes.rst +103 -0
- pygmo2/doc/tutorials/coding_udi.rst +87 -0
- pygmo2/doc/tutorials/coding_udp_constrained.rst +233 -0
- pygmo2/doc/tutorials/coding_udp_minlp.rst +177 -0
- pygmo2/doc/tutorials/coding_udp_multi_objective.rst +72 -0
- pygmo2/doc/tutorials/coding_udp_simple.rst +274 -0
- pygmo2/doc/tutorials/evolving_a_population.rst +80 -0
- pygmo2/doc/tutorials/hypervolume.rst +186 -0
- pygmo2/doc/tutorials/hypervolume_advanced.rst +137 -0
- pygmo2/doc/tutorials/hypervolume_approx.rst +91 -0
- pygmo2/doc/tutorials/moo.rst +93 -0
- pygmo2/doc/tutorials/moo_moead.rst +94 -0
- pygmo2/doc/tutorials/nlopt_basics.rst +199 -0
- pygmo2/doc/tutorials/nspso_tutorial_zdt1_2.rst +134 -0
- pygmo2/doc/tutorials/solving_schwefel_20.rst +70 -0
- pygmo2/doc/tutorials/tutorials.rst +82 -0
- pygmo2/doc/tutorials/udp_meta_decorator.rst +236 -0
- pygmo2/doc/tutorials/using_algorithm.rst +68 -0
- pygmo2/doc/tutorials/using_archipelago.rst +230 -0
- pygmo2/doc/tutorials/using_island.rst +165 -0
- pygmo2/doc/tutorials/using_population.rst +154 -0
- pygmo2/doc/tutorials/using_problem.rst +93 -0
- pygmo2/doc/tutorials/zdt3_maco_benchmark.rst +353 -0
- pygmo2/pygmo/CMakeLists.txt +133 -0
- pygmo2/pygmo/__init__.py +771 -0
- pygmo2/pygmo/_algorithm_test.py +635 -0
- pygmo2/pygmo/_bfe_test.py +634 -0
- pygmo2/pygmo/_check_deps.py +21 -0
- pygmo2/pygmo/_ipyparallel_utils.py +16 -0
- pygmo2/pygmo/_island_test.py +700 -0
- pygmo2/pygmo/_mp_utils.py +67 -0
- pygmo2/pygmo/_patch_algorithm.py +83 -0
- pygmo2/pygmo/_patch_bfe.py +118 -0
- pygmo2/pygmo/_patch_island.py +83 -0
- pygmo2/pygmo/_patch_problem.py +85 -0
- pygmo2/pygmo/_patch_r_policy.py +65 -0
- pygmo2/pygmo/_patch_s_policy.py +65 -0
- pygmo2/pygmo/_patch_topology.py +85 -0
- pygmo2/pygmo/_problem_test.py +2014 -0
- pygmo2/pygmo/_py_algorithms.py +625 -0
- pygmo2/pygmo/_py_bfes.py +503 -0
- pygmo2/pygmo/_py_islands.py +641 -0
- pygmo2/pygmo/_py_problems.py +419 -0
- pygmo2/pygmo/_r_policy_test.py +305 -0
- pygmo2/pygmo/_s_policy_test.py +305 -0
- pygmo2/pygmo/_topology_test.py +479 -0
- pygmo2/pygmo/_version.py.in +9 -0
- pygmo2/pygmo/algorithm.cpp +165 -0
- pygmo2/pygmo/algorithm.hpp +80 -0
- pygmo2/pygmo/bfe.cpp +113 -0
- pygmo2/pygmo/bfe.hpp +77 -0
- pygmo2/pygmo/common_base.cpp +47 -0
- pygmo2/pygmo/common_base.hpp +44 -0
- pygmo2/pygmo/common_utils.cpp +343 -0
- pygmo2/pygmo/common_utils.hpp +241 -0
- pygmo2/pygmo/core.cpp +1112 -0
- pygmo2/pygmo/docstrings.cpp +7689 -0
- pygmo2/pygmo/docstrings.hpp +355 -0
- pygmo2/pygmo/expose_algorithms.hpp +138 -0
- pygmo2/pygmo/expose_algorithms_0.cpp +343 -0
- pygmo2/pygmo/expose_algorithms_1.cpp +308 -0
- pygmo2/pygmo/expose_bfes.cpp +92 -0
- pygmo2/pygmo/expose_bfes.hpp +53 -0
- pygmo2/pygmo/expose_islands.cpp +61 -0
- pygmo2/pygmo/expose_islands.hpp +58 -0
- pygmo2/pygmo/expose_problems.hpp +62 -0
- pygmo2/pygmo/expose_problems_0.cpp +200 -0
- pygmo2/pygmo/expose_problems_1.cpp +127 -0
- pygmo2/pygmo/expose_r_policies.cpp +69 -0
- pygmo2/pygmo/expose_r_policies.hpp +53 -0
- pygmo2/pygmo/expose_s_policies.cpp +69 -0
- pygmo2/pygmo/expose_s_policies.hpp +53 -0
- pygmo2/pygmo/expose_topologies.cpp +112 -0
- pygmo2/pygmo/expose_topologies.hpp +53 -0
- pygmo2/pygmo/handle_thread_py_exception.cpp +63 -0
- pygmo2/pygmo/handle_thread_py_exception.hpp +25 -0
- pygmo2/pygmo/island.cpp +158 -0
- pygmo2/pygmo/island.hpp +73 -0
- pygmo2/pygmo/plotting/CMakeLists.txt +9 -0
- pygmo2/pygmo/plotting/__init__.py +178 -0
- pygmo2/pygmo/problem.cpp +378 -0
- pygmo2/pygmo/problem.hpp +106 -0
- pygmo2/pygmo/r_policy.cpp +136 -0
- pygmo2/pygmo/r_policy.hpp +77 -0
- pygmo2/pygmo/s11n_wrappers.hpp +127 -0
- pygmo2/pygmo/s_policy.cpp +135 -0
- pygmo2/pygmo/s_policy.hpp +77 -0
- pygmo2/pygmo/sr_policy_add_rate_constructor.hpp +50 -0
- pygmo2/pygmo/test.py +3076 -0
- pygmo2/pygmo/topology.cpp +183 -0
- pygmo2/pygmo/topology.hpp +79 -0
- pygmo2/tools/circleci_additional_tests.py +57 -0
- pygmo2/tools/circleci_bionic_conda_pagmo_head_310.sh +49 -0
- pygmo2/tools/circleci_bionic_conda_pagmo_head_38.sh +49 -0
- pygmo2/tools/circleci_bionic_conda_pagmo_head_39.sh +45 -0
- pygmo2/tools/circleci_ubuntu_arm64.sh +47 -0
- pygmo2/tools/gha_deploydocs.sh +50 -0
- pygmo2/tools/gha_macos-10.15-py310.sh +42 -0
- pygmo2/tools/gha_manylinux.sh +97 -0
- pygmo2/tools/gha_windows.ps1 +42 -0
- pygmo2/tools/start_ip_cluster.ps1 +8 -0
- pygmo2/tools/travis_ubuntu_ppc64.sh +43 -0
- pygmo2/tools/wheel_setup.cfg +2 -0
- pygmo2/tools/wheel_setup.py +55 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
jobs:
|
|
4
|
+
bionic_conda_pagmo_head_38:
|
|
5
|
+
docker:
|
|
6
|
+
- image: circleci/buildpack-deps:bionic
|
|
7
|
+
steps:
|
|
8
|
+
- checkout
|
|
9
|
+
- run:
|
|
10
|
+
name: Build and test
|
|
11
|
+
command: bash ./tools/circleci_bionic_conda_pagmo_head_38.sh
|
|
12
|
+
bionic_conda_pagmo_head_310:
|
|
13
|
+
docker:
|
|
14
|
+
- image: circleci/buildpack-deps:bionic
|
|
15
|
+
steps:
|
|
16
|
+
- checkout
|
|
17
|
+
- run:
|
|
18
|
+
name: Build and test
|
|
19
|
+
command: bash ./tools/circleci_bionic_conda_pagmo_head_310.sh
|
|
20
|
+
bionic_conda_pagmo_head_39:
|
|
21
|
+
docker:
|
|
22
|
+
- image: circleci/buildpack-deps:bionic
|
|
23
|
+
steps:
|
|
24
|
+
- checkout
|
|
25
|
+
- run:
|
|
26
|
+
name: Build and test
|
|
27
|
+
command: bash ./tools/circleci_bionic_conda_pagmo_head_39.sh
|
|
28
|
+
ubuntu_arm64:
|
|
29
|
+
machine:
|
|
30
|
+
image: ubuntu-2004:202101-01
|
|
31
|
+
resource_class: arm.medium
|
|
32
|
+
steps:
|
|
33
|
+
- checkout
|
|
34
|
+
- run:
|
|
35
|
+
name: Build and test
|
|
36
|
+
command: bash ./tools/circleci_ubuntu_arm64.sh
|
|
37
|
+
|
|
38
|
+
workflows:
|
|
39
|
+
version: 2.1
|
|
40
|
+
all_builds:
|
|
41
|
+
jobs:
|
|
42
|
+
- bionic_conda_pagmo_head_38
|
|
43
|
+
- bionic_conda_pagmo_head_39
|
|
44
|
+
- bionic_conda_pagmo_head_310
|
|
45
|
+
- ubuntu_arm64
|
pygmo2/.clang-format
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Language: Cpp
|
|
2
|
+
AccessModifierOffset: -4
|
|
3
|
+
AlignAfterOpenBracket: true
|
|
4
|
+
AlignConsecutiveAssignments: false
|
|
5
|
+
AlignEscapedNewlinesLeft: false
|
|
6
|
+
AlignOperands: true
|
|
7
|
+
AlignTrailingComments: true
|
|
8
|
+
AllowAllParametersOfDeclarationOnNextLine: true
|
|
9
|
+
AllowShortBlocksOnASingleLine: false
|
|
10
|
+
AllowShortCaseLabelsOnASingleLine: false
|
|
11
|
+
AllowShortFunctionsOnASingleLine: Empty
|
|
12
|
+
AllowShortIfStatementsOnASingleLine: false
|
|
13
|
+
AllowShortLoopsOnASingleLine: false
|
|
14
|
+
AlwaysBreakAfterDefinitionReturnType: None
|
|
15
|
+
AlwaysBreakBeforeMultilineStrings: false
|
|
16
|
+
AlwaysBreakTemplateDeclarations: true
|
|
17
|
+
BinPackArguments: true
|
|
18
|
+
BinPackParameters: true
|
|
19
|
+
BreakBeforeBinaryOperators: All
|
|
20
|
+
BreakBeforeBraces: Linux
|
|
21
|
+
BreakBeforeTernaryOperators: true
|
|
22
|
+
BreakConstructorInitializersBeforeComma: false
|
|
23
|
+
ColumnLimit: 120
|
|
24
|
+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
25
|
+
ConstructorInitializerIndentWidth: 4
|
|
26
|
+
ContinuationIndentWidth: 4
|
|
27
|
+
Cpp11BracedListStyle: true
|
|
28
|
+
DerivePointerAlignment: false
|
|
29
|
+
DisableFormat: false
|
|
30
|
+
ExperimentalAutoDetectBinPacking: false
|
|
31
|
+
IndentCaseLabels: true
|
|
32
|
+
IndentWidth: 4
|
|
33
|
+
IndentWrappedFunctionNames: false
|
|
34
|
+
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
35
|
+
MacroBlockBegin: ''
|
|
36
|
+
MacroBlockEnd: ''
|
|
37
|
+
MaxEmptyLinesToKeep: 1
|
|
38
|
+
NamespaceIndentation: None
|
|
39
|
+
ObjCBlockIndentWidth: 2
|
|
40
|
+
ObjCSpaceAfterProperty: false
|
|
41
|
+
ObjCSpaceBeforeProtocolList: true
|
|
42
|
+
PenaltyBreakBeforeFirstCallParameter: 19
|
|
43
|
+
PenaltyBreakComment: 22312
|
|
44
|
+
PenaltyBreakFirstLessLess: 120
|
|
45
|
+
PenaltyBreakString: 2123
|
|
46
|
+
PenaltyExcessCharacter: 1000000
|
|
47
|
+
PenaltyReturnTypeOnItsOwnLine: 60
|
|
48
|
+
PointerAlignment: Right
|
|
49
|
+
SpaceAfterCStyleCast: false
|
|
50
|
+
SpaceBeforeAssignmentOperators: true
|
|
51
|
+
SpaceBeforeParens: ControlStatements
|
|
52
|
+
SpaceInEmptyParentheses: false
|
|
53
|
+
SpacesBeforeTrailingComments: 1
|
|
54
|
+
SpacesInAngles: false
|
|
55
|
+
SpacesInContainerLiterals: false
|
|
56
|
+
SpacesInCStyleCastParentheses: false
|
|
57
|
+
SpacesInParentheses: false
|
|
58
|
+
SpacesInSquareBrackets: false
|
|
59
|
+
Standard: Cpp11
|
|
60
|
+
TabWidth: 4
|
|
61
|
+
UseTab: Never
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: "[BUG]"
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Environment (please complete the following information):**
|
|
27
|
+
- OS: [e.g. Linux]
|
|
28
|
+
- Installation method: [e.g. conda, pip, source]
|
|
29
|
+
- Version: [e.g. 2.15]
|
|
30
|
+
|
|
31
|
+
**Additional context**
|
|
32
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: "[FEATURE]"
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# This is a basic workflow to help you get started with Actions
|
|
2
|
+
|
|
3
|
+
name: CI
|
|
4
|
+
|
|
5
|
+
# Controls when the workflow will run
|
|
6
|
+
on:
|
|
7
|
+
# Triggers the workflow on push or pull request events but only for the master branch
|
|
8
|
+
push:
|
|
9
|
+
branches: [ master ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ master ]
|
|
12
|
+
|
|
13
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
17
|
+
jobs:
|
|
18
|
+
manylinux228-py311:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
container:
|
|
21
|
+
image: pagmo2/manylinux228_x86_64_with_deps:latest
|
|
22
|
+
env:
|
|
23
|
+
PYGMO_BUILD_TYPE: "Python311"
|
|
24
|
+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
|
25
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v2
|
|
28
|
+
- name: Build
|
|
29
|
+
run: bash tools/gha_manylinux.sh
|
|
30
|
+
manylinux228-py310:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
container:
|
|
33
|
+
image: pagmo2/manylinux228_x86_64_with_deps:latest
|
|
34
|
+
env:
|
|
35
|
+
PYGMO_BUILD_TYPE: "Python310"
|
|
36
|
+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
|
37
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v2
|
|
40
|
+
- name: Build
|
|
41
|
+
run: bash tools/gha_manylinux.sh
|
|
42
|
+
manylinux228-py39:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
container:
|
|
45
|
+
image: pagmo2/manylinux228_x86_64_with_deps:latest
|
|
46
|
+
env:
|
|
47
|
+
PYGMO_BUILD_TYPE: "Python39"
|
|
48
|
+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
|
49
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v2
|
|
52
|
+
- name: Build
|
|
53
|
+
run: bash tools/gha_manylinux.sh
|
|
54
|
+
manylinux228-py38:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
container:
|
|
57
|
+
image: pagmo2/manylinux228_x86_64_with_deps:latest
|
|
58
|
+
env:
|
|
59
|
+
PYGMO_BUILD_TYPE: "Python38"
|
|
60
|
+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
|
61
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v2
|
|
64
|
+
- name: Build
|
|
65
|
+
run: bash tools/gha_manylinux.sh
|
|
66
|
+
macos-10_15-py310:
|
|
67
|
+
runs-on: macos-10.15
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v2
|
|
70
|
+
- name: Build
|
|
71
|
+
run: bash tools/gha_macos-10.15-py310.sh
|
|
72
|
+
windows-2019-py311:
|
|
73
|
+
runs-on: windows-2019
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v2
|
|
76
|
+
- name: Add msbuild to PATH
|
|
77
|
+
uses: microsoft/setup-msbuild@v1.0.2
|
|
78
|
+
- uses: conda-incubator/setup-miniconda@v2
|
|
79
|
+
with:
|
|
80
|
+
auto-update-conda: true
|
|
81
|
+
python-version: 3.11
|
|
82
|
+
channels: conda-forge
|
|
83
|
+
channel-priority: strict
|
|
84
|
+
- name: Build
|
|
85
|
+
run: .\tools\gha_windows.ps1
|
|
86
|
+
shell: powershell
|
|
87
|
+
build-and-deploydocs:
|
|
88
|
+
if: ${{ github.event_name }} == 'push'
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v2
|
|
92
|
+
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
|
|
93
|
+
run: bash tools/gha_deploydocs.sh
|
|
94
|
+
- name: Upload to github pages 🚀
|
|
95
|
+
if: ${{ github.event_name == 'push' }}
|
|
96
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
|
97
|
+
with:
|
|
98
|
+
folder: doc/_build/html # The folder the action should deploy.
|
|
99
|
+
|
|
100
|
+
|
pygmo2/.gitignore
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Build dirs.
|
|
2
|
+
build*
|
|
3
|
+
|
|
4
|
+
# Temp files.
|
|
5
|
+
*~
|
|
6
|
+
*.bak
|
|
7
|
+
*.ipynb_checkpoints*
|
|
8
|
+
*__pycache__*
|
|
9
|
+
|
|
10
|
+
# Editor files
|
|
11
|
+
*.vscode*
|
|
12
|
+
|
|
13
|
+
# .orig files from patch.
|
|
14
|
+
*.orig
|
|
15
|
+
|
|
16
|
+
# Docs.
|
|
17
|
+
doc/conf.py
|
|
18
|
+
doc/_build
|
|
19
|
+
|
|
20
|
+
# clangd bits.
|
|
21
|
+
.cache
|
pygmo2/.travis.yml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
language: cpp
|
|
2
|
+
|
|
3
|
+
# Do not build branches of the form "pr/*". By prefixing pull requests coming
|
|
4
|
+
# from branches inside the repository with pr/, this avoids building both the
|
|
5
|
+
# branch push _and_ the pull request.
|
|
6
|
+
branches:
|
|
7
|
+
except: /pr\/.*/
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
matrix:
|
|
11
|
+
- env: PYGMO_BUILD_TYPE="ppc64"
|
|
12
|
+
os: linux
|
|
13
|
+
arch: ppc64le
|
|
14
|
+
dist: focal
|
|
15
|
+
script:
|
|
16
|
+
- if [[ "${PYGMO_BUILD_TYPE}" == ppc64 ]]; then bash tools/travis_ubuntu_ppc64.sh; fi
|
|
17
|
+
|
|
18
|
+
notifications:
|
|
19
|
+
email: false
|
pygmo2/CMakeLists.txt
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# NOTE: FindPython3 supported since CMake 3.12.0, but we use
|
|
2
|
+
# options that appear in 3.18.
|
|
3
|
+
cmake_minimum_required(VERSION 3.18.0)
|
|
4
|
+
|
|
5
|
+
# Set default build type to "Release".
|
|
6
|
+
# NOTE: this should be done before the project command since the latter can set
|
|
7
|
+
# CMAKE_BUILD_TYPE itself (it does so for nmake).
|
|
8
|
+
if(NOT CMAKE_BUILD_TYPE)
|
|
9
|
+
set(CMAKE_BUILD_TYPE Release CACHE STRING
|
|
10
|
+
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
|
11
|
+
FORCE)
|
|
12
|
+
endif()
|
|
13
|
+
|
|
14
|
+
project(pygmo VERSION 2.19.0 LANGUAGES CXX C)
|
|
15
|
+
|
|
16
|
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/yacma")
|
|
17
|
+
|
|
18
|
+
message(STATUS "System name: ${CMAKE_SYSTEM_NAME}")
|
|
19
|
+
message(STATUS "pygmo version: ${pygmo_VERSION}")
|
|
20
|
+
|
|
21
|
+
option(PYGMO_ENABLE_IPO "Enable IPO (requires compiler support)." OFF)
|
|
22
|
+
mark_as_advanced(PYGMO_ENABLE_IPO)
|
|
23
|
+
|
|
24
|
+
# Run the YACMA compiler setup.
|
|
25
|
+
include(YACMACompilerLinkerSettings)
|
|
26
|
+
|
|
27
|
+
# Assemble the flags.
|
|
28
|
+
set(PYGMO_CXX_FLAGS_DEBUG ${YACMA_CXX_FLAGS} ${YACMA_CXX_FLAGS_DEBUG})
|
|
29
|
+
set(PYGMO_CXX_FLAGS_RELEASE ${YACMA_CXX_FLAGS})
|
|
30
|
+
|
|
31
|
+
if(YACMA_COMPILER_IS_MSVC)
|
|
32
|
+
include(CheckCXXCompilerFlag)
|
|
33
|
+
# Disable the idiotic minmax macros on MSVC (both cl and clang-cl).
|
|
34
|
+
# Also, enable the bigobj flag and the WIN32_LEAN_AND_MEAN definitions:
|
|
35
|
+
# https://stackoverflow.com/questions/11040133/what-does-defining-win32-lean-and-mean-exclude-exactly
|
|
36
|
+
list(APPEND PYGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/bigobj" "-DWIN32_LEAN_AND_MEAN")
|
|
37
|
+
list(APPEND PYGMO_CXX_FLAGS_RELEASE "-DNOMINMAX" "/bigobj" "-DWIN32_LEAN_AND_MEAN")
|
|
38
|
+
# Enable strict conformance mode, if supported.
|
|
39
|
+
set(CMAKE_REQUIRED_QUIET TRUE)
|
|
40
|
+
check_cxx_compiler_flag("/permissive-" _PYGMO_MSVC_SUPPORTS_STRICT_CONFORMANCE)
|
|
41
|
+
unset(CMAKE_REQUIRED_QUIET)
|
|
42
|
+
if(_PYGMO_MSVC_SUPPORTS_STRICT_CONFORMANCE)
|
|
43
|
+
message(STATUS "The '/permissive-' flag is supported, enabling it.")
|
|
44
|
+
list(APPEND PYGMO_CXX_FLAGS_DEBUG "/permissive-")
|
|
45
|
+
list(APPEND PYGMO_CXX_FLAGS_RELEASE "/permissive-")
|
|
46
|
+
endif()
|
|
47
|
+
unset(_PYGMO_MSVC_SUPPORTS_STRICT_CONFORMANCE)
|
|
48
|
+
if(YACMA_COMPILER_IS_CLANGXX)
|
|
49
|
+
# clang-cl emits various warnings from third party deps, let's just silence them.
|
|
50
|
+
# NOTE: at one point in the recent past, MSVC added an options similar to GCC's isystem:
|
|
51
|
+
# https://blogs.msdn.microsoft.com/vcblog/2017/12/13/broken-warnings-theory/
|
|
52
|
+
# We probably just need to wait for this to be picked up by CMake/clang-cl. Let's
|
|
53
|
+
# revisit the issue in the future.
|
|
54
|
+
list(APPEND _PYGMO_CLANG_CL_DISABLED_WARNINGS
|
|
55
|
+
"-Wno-unused-variable"
|
|
56
|
+
"-Wno-inconsistent-dllimport"
|
|
57
|
+
"-Wno-unknown-pragmas"
|
|
58
|
+
"-Wno-unused-parameter"
|
|
59
|
+
"-Wno-sign-compare"
|
|
60
|
+
"-Wno-deprecated-declarations"
|
|
61
|
+
"-Wno-deprecated-dynamic-exception-spec"
|
|
62
|
+
"-Wno-old-style-cast"
|
|
63
|
+
"-Wno-sign-conversion"
|
|
64
|
+
"-Wno-non-virtual-dtor"
|
|
65
|
+
"-Wno-deprecated"
|
|
66
|
+
"-Wno-shadow"
|
|
67
|
+
"-Wno-shorten-64-to-32"
|
|
68
|
+
"-Wno-reserved-id-macro"
|
|
69
|
+
"-Wno-undef"
|
|
70
|
+
"-Wno-c++98-compat-pedantic"
|
|
71
|
+
"-Wno-documentation-unknown-command"
|
|
72
|
+
"-Wno-zero-as-null-pointer-constant"
|
|
73
|
+
"-Wno-language-extension-token"
|
|
74
|
+
"-Wno-gnu-anonymous-struct"
|
|
75
|
+
"-Wno-nested-anon-types"
|
|
76
|
+
"-Wno-documentation"
|
|
77
|
+
"-Wno-comma"
|
|
78
|
+
"-Wno-nonportable-system-include-path"
|
|
79
|
+
"-Wno-global-constructors"
|
|
80
|
+
"-Wno-redundant-parens"
|
|
81
|
+
"-Wno-exit-time-destructors"
|
|
82
|
+
"-Wno-missing-noreturn"
|
|
83
|
+
"-Wno-switch-enum"
|
|
84
|
+
"-Wno-covered-switch-default"
|
|
85
|
+
"-Wno-float-equal"
|
|
86
|
+
"-Wno-double-promotion"
|
|
87
|
+
"-Wno-microsoft-enum-value"
|
|
88
|
+
"-Wno-missing-prototypes"
|
|
89
|
+
"-Wno-implicit-fallthrough"
|
|
90
|
+
"-Wno-format-nonliteral"
|
|
91
|
+
"-Wno-cast-qual"
|
|
92
|
+
"-Wno-disabled-macro-expansion"
|
|
93
|
+
"-Wno-unused-private-field"
|
|
94
|
+
"-Wno-unused-template"
|
|
95
|
+
"-Wno-unused-macros"
|
|
96
|
+
"-Wno-extra-semi-stmt"
|
|
97
|
+
"-Wno-c++98-compat")
|
|
98
|
+
list(APPEND PYGMO_CXX_FLAGS_DEBUG ${_PYGMO_CLANG_CL_DISABLED_WARNINGS})
|
|
99
|
+
list(APPEND PYGMO_CXX_FLAGS_RELEASE ${_PYGMO_CLANG_CL_DISABLED_WARNINGS})
|
|
100
|
+
unset(_PYGMO_CLANG_CL_DISABLED_WARNINGS)
|
|
101
|
+
else()
|
|
102
|
+
# Problematic MSVC cl warnings.
|
|
103
|
+
list(APPEND PYGMO_CXX_FLAGS_DEBUG "/wd4459" "/wd4251")
|
|
104
|
+
list(APPEND PYGMO_CXX_FLAGS_RELEASE "/wd4459" "/wd4251")
|
|
105
|
+
endif()
|
|
106
|
+
endif()
|
|
107
|
+
if(MINGW)
|
|
108
|
+
# In MinGW some tests generate big object files.
|
|
109
|
+
message(STATUS "Enabling the '-Wa,-mbig-obj' flag for MinGW.")
|
|
110
|
+
list(APPEND PYGMO_CXX_FLAGS_DEBUG "-Wa,-mbig-obj")
|
|
111
|
+
list(APPEND PYGMO_CXX_FLAGS_RELEASE "-Wa,-mbig-obj")
|
|
112
|
+
endif()
|
|
113
|
+
# NOTE: at least up to version 7, GCC is needlessly chatty
|
|
114
|
+
# about the 'override' attribute. Thus, we manually disable
|
|
115
|
+
# the -Wsuggest-override debug flag.
|
|
116
|
+
if(YACMA_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8")
|
|
117
|
+
include(CheckCXXCompilerFlag)
|
|
118
|
+
set(CMAKE_REQUIRED_QUIET TRUE)
|
|
119
|
+
check_cxx_compiler_flag("-Wno-suggest-override" _PYGMO_GCC_SUPPORTS_NO_OVERRIDE)
|
|
120
|
+
unset(CMAKE_REQUIRED_QUIET)
|
|
121
|
+
if(_PYGMO_GCC_SUPPORTS_NO_OVERRIDE)
|
|
122
|
+
message(STATUS "Enabling the '-Wno-suggest-override' flag for GCC<8.")
|
|
123
|
+
list(APPEND PYGMO_CXX_FLAGS_DEBUG "-Wno-suggest-override")
|
|
124
|
+
endif()
|
|
125
|
+
unset(_PYGMO_GCC_SUPPORTS_NO_OVERRIDE)
|
|
126
|
+
endif()
|
|
127
|
+
|
|
128
|
+
# Find the dependencies.
|
|
129
|
+
|
|
130
|
+
# pagmo.
|
|
131
|
+
# NOTE: put the minimum version in a variable
|
|
132
|
+
# so that we can re-use it below.
|
|
133
|
+
set (_PYGMO_MIN_PAGMO_VERSION 2.19.0)
|
|
134
|
+
find_package(pagmo REQUIRED)
|
|
135
|
+
if(${pagmo_VERSION} VERSION_LESS ${_PYGMO_MIN_PAGMO_VERSION})
|
|
136
|
+
message(FATAL_ERROR "The minimum pagmo version required by pygmo is ${_PYGMO_MIN_PAGMO_VERSION}, but version ${pagmo_VERSION} was found instead.")
|
|
137
|
+
endif()
|
|
138
|
+
|
|
139
|
+
# python.
|
|
140
|
+
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
|
|
141
|
+
message(STATUS "Python3 interpreter: ${Python3_EXECUTABLE}")
|
|
142
|
+
message(STATUS "Python3 installation directory: ${Python3_SITEARCH}")
|
|
143
|
+
set(PYGMO_INSTALL_PATH "" CACHE STRING "pygmo module installation path")
|
|
144
|
+
mark_as_advanced(PYGMO_INSTALL_PATH)
|
|
145
|
+
|
|
146
|
+
# Boost setup.
|
|
147
|
+
include(PygmoFindBoost)
|
|
148
|
+
|
|
149
|
+
# pybind11.
|
|
150
|
+
find_package(pybind11 REQUIRED)
|
|
151
|
+
if(${pybind11_VERSION} VERSION_LESS "2.10")
|
|
152
|
+
message(FATAL_ERROR "pybind11 >= 2.10 is required, but version ${pybind11_VERSION} was found instead.")
|
|
153
|
+
endif()
|
|
154
|
+
|
|
155
|
+
# Configure the sphinx config file.
|
|
156
|
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py" @ONLY)
|
|
157
|
+
|
|
158
|
+
# Add the module directory.
|
|
159
|
+
add_subdirectory(pygmo)
|