Skip to content

Commit aeff558

Browse files
authored
Merge pull request #407 from tpaviot/review/conda
Review/conda
2 parents ec416c7 + 336ee83 commit aeff558

6 files changed

Lines changed: 56 additions & 122 deletions

File tree

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,25 @@ matrix:
3737
os: linux
3838
- env: PYTHON="3.5" CONDA_PY=35 ARCH="x86_64"
3939
os: osx
40+
- env: PYTHON="3.6" CONDA_PY=36 ARCH="x86_64"
41+
os: linux
42+
- env: PYTHON="3.6" CONDA_PY=36 ARCH="x86_64"
43+
os: osx
4044
# Use miniconda to install binary versions of numpy etc. from continuum
4145
# analytic's repository. Follows an approach described by Dan Blanchard:
4246
# https://gist.github.com/dan-blanchard/7045057
4347
before_install:
4448
- if [ ${PYTHON:0:1} == "2" ]; then
4549
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
46-
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-$ARCH.sh -O miniconda.sh;
50+
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
4751
else
48-
wget http://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-$ARCH.sh -O miniconda.sh;
52+
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
4953
fi;
5054
else
5155
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
52-
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-$ARCH.sh -O miniconda.sh;
56+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
5357
else
54-
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-$ARCH.sh -O miniconda.sh;
58+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
5559
fi;
5660
fi;
5761
- chmod +x miniconda.sh

appveyor.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: pythonocc-core-0.17.2-dev.{build}
1+
version: pythonocc-core-0.17.3-dev.{build}
22

33
environment:
44
global:
@@ -36,6 +36,18 @@ environment:
3636
CONDA_PY: "35"
3737
CONDA_NPY: "18"
3838
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
39+
- PYTHON: "C:\\Python36_32"
40+
PYTHON_VERSION: "3.6"
41+
PYTHON_ARCH: "32"
42+
CONDA_PY: "36"
43+
CONDA_NPY: "18"
44+
CONDA_INSTALL_LOCN: "C:\\Miniconda36"
45+
- PYTHON: "C:\\Python36_64"
46+
PYTHON_VERSION: "3.6"
47+
PYTHON_ARCH: "64"
48+
CONDA_PY: "36"
49+
CONDA_NPY: "18"
50+
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
3951
# We always use a 64-bit machine, but can build x86 distributions
4052
# with the TARGET_ARCH variable (which is used by CMD_IN_ENV).
4153
platform:
@@ -61,6 +73,7 @@ install:
6173
- cmd: conda config --set show_channel_urls true
6274
- cmd: conda update --yes --quiet conda
6375
- cmd: conda install --yes conda-build
76+
- "%CMD_IN_ENV% conda config --add channels https://conda.anaconda.org/conda-forge"
6477
- "%CMD_IN_ENV% conda config --add channels https://conda.anaconda.org/dlr-sc"
6578
- "%CMD_IN_ENV% conda config --add channels https://conda.anaconda.org/oce"
6679

Lines changed: 26 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,66 @@
1-
:: EXPECTED ENV VARS: TARGET_ARCH (either x86 or x64)
2-
:: CONDA_PY (either 27, 33, 35 etc. - only major version is extracted)
1+
:: To build extensions for 64 bit Python 3.5 or later no special environment needs
2+
:: to be configured.
33
::
4-
::
5-
:: To build extensions for 64 bit Python 3, we need to configure environment
4+
:: To build extensions for 64 bit Python 3.4 or earlier, we need to configure environment
65
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
76
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
87
::
98
:: To build extensions for 64 bit Python 2, we need to configure environment
109
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
1110
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
1211
::
13-
:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
14-
:: environment configurations.
12+
:: 32 bit builds do not require specific environment configurations.
1513
::
1614
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
1715
:: cmd interpreter, at least for (SDK v7.0)
1816
::
1917
:: More details at:
2018
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
21-
:: http://stackoverflow.com/a/13751649/163740
22-
::
23-
:: Author: Phil Elson
24-
:: Original Author: Olivier Grisel (https://github.com/ogrisel/python-appveyor-demo)
25-
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
26-
::
27-
:: Notes about batch files for Python people:
28-
::
29-
:: Quotes in values are literally part of the values:
30-
:: SET FOO="bar"
31-
:: FOO is now five characters long: " b a r "
32-
:: If you don't want quotes, don't include them on the right-hand side.
19+
:: https://stackoverflow.com/a/13751649/163740
3320
::
34-
:: The CALL lines at the end of this file look redundant, but if you move them
35-
:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
36-
:: case, I don't know why.
21+
:: Original Author: Olivier Grisel
22+
:: License: CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/
23+
:: This version based on updates for python 3.5 by Phil Elson at:
24+
:: https://github.com/pelson/Obvious-CI/tree/master/scripts
25+
3726
@ECHO OFF
3827

3928
SET COMMAND_TO_RUN=%*
4029
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
4130

42-
:: Extract the major and minor versions, and allow for the minor version to be
43-
:: more than 9. This requires the version number to have two dots in it.
44-
SET MAJOR_PYTHON_VERSION=%CONDA_PY:~0,1%
45-
46-
IF "%CONDA_PY:~2,1%" == "" (
47-
:: CONDA_PY style, such as 27, 34 etc.
48-
SET MINOR_PYTHON_VERSION=%CONDA_PY:~1,1%
49-
) ELSE (
50-
IF "%CONDA_PY:~3,1%" == "." (
51-
SET MINOR_PYTHON_VERSION=%CONDA_PY:~2,1%
52-
) ELSE (
53-
SET MINOR_PYTHON_VERSION=%CONDA_PY:~2,2%
54-
)
55-
)
56-
57-
:: Based on the Python version, determine what SDK version to use, and whether
58-
:: to set the SDK for 64-bit.
59-
IF %MAJOR_PYTHON_VERSION% == 2 (
31+
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
32+
SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
33+
IF %MAJOR_PYTHON_VERSION% == "2" (
6034
SET WINDOWS_SDK_VERSION="v7.0"
6135
SET SET_SDK_64=Y
62-
) ELSE (
63-
IF %MAJOR_PYTHON_VERSION% == 3 (
64-
SET WINDOWS_SDK_VERSION="v7.1"
65-
IF %MINOR_PYTHON_VERSION% LEQ 4 (
66-
SET SET_SDK_64=Y
67-
) ELSE (
68-
SET SET_SDK_64=N
69-
)
36+
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
37+
SET WINDOWS_SDK_VERSION="v7.1"
38+
IF %MINOR_PYTHON_VERSION% LEQ 4 (
39+
SET SET_SDK_64=Y
7040
) ELSE (
71-
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
72-
EXIT /B 1
41+
SET SET_SDK_64=N
7342
)
43+
) ELSE (
44+
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
45+
EXIT 1
7446
)
7547

76-
IF "%TARGET_ARCH%"=="x64" (
48+
IF "%PYTHON_ARCH%"=="64" (
7749
IF %SET_SDK_64% == Y (
7850
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
7951
SET DISTUTILS_USE_SDK=1
8052
SET MSSdk=1
8153
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
8254
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
8355
ECHO Executing: %COMMAND_TO_RUN%
84-
call %COMMAND_TO_RUN% || EXIT /B 1
85-
) ELSE (
56+
call %COMMAND_TO_RUN% || EXIT 1
57+
) ELSE (
8658
ECHO Using default MSVC build environment for 64 bit architecture
8759
ECHO Executing: %COMMAND_TO_RUN%
88-
call %COMMAND_TO_RUN% || EXIT /B 1
60+
call %COMMAND_TO_RUN% || EXIT 1
8961
)
9062
) ELSE (
9163
ECHO Using default MSVC build environment for 32 bit architecture
9264
ECHO Executing: %COMMAND_TO_RUN%
93-
call %COMMAND_TO_RUN% || EXIT /B 1
65+
call %COMMAND_TO_RUN% || EXIT 1
9466
)

ci/conda/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$PREFIX \
2727
if [ `uname` == Darwin ]; then
2828
ninja
2929
else
30-
ninja -j 3
30+
ninja -j 6
3131
fi
3232

3333
# Install step

ci/conda/fix_GeomFill_BSplineCurves_Init_method.patch

Lines changed: 0 additions & 56 deletions
This file was deleted.

ci/conda/meta.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ source:
77
path: ../..
88
patches:
99
- fix_graphicshr_location.patch [win]
10-
- fix_GeomFill_BSplineCurves_Init_method.patch
1110

1211
build:
1312
script_env:
@@ -25,24 +24,26 @@ requirements:
2524
build:
2625
- patch [win]
2726
- python
28-
- oce ==0.17.2
27+
- oce ==0.17.3
2928
- cmake
3029
- ninja
3130
- swig
3231
- freetype
3332
- gcc [linux]
33+
3434
run:
35-
- pyqt
36-
- wxpython [py27]
37-
- pyside [py27]
38-
- oce ==0.17.2
35+
- pyqt >=5
36+
- oce ==0.17.3
3937
- python
4038
- freetype
4139
- pyobjc-core [osx and py27]
4240

4341
test:
4442
requires:
4543
- scipy
44+
- wxpython [py27]
45+
- pyside [py27]
46+
4647
about:
4748
home: https://github.com/tpaviot/pythonocc-core
4849
license: LGPL

0 commit comments

Comments
 (0)