Skip to content

Commit

Permalink
Merge pull request #116 from Esri/develop
Browse files Browse the repository at this point in the history
Release 1.4
  • Loading branch information
clechot authored Aug 24, 2021
2 parents 9a2d2e2 + 6d1ebf9 commit a50d30d
Show file tree
Hide file tree
Showing 50 changed files with 642 additions and 639 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.venv*
build
dist
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
/**/__pycache__
/test-reports/

/.venv*/
**/.conda-*/
**/.venv*/

/**/Pipfile.lock

# development mode
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# PyPRT ChangeLog

## v1.4.0 (2021-08-24)

* Compatible CityEngine versions to create RPKs with: 2021.0 or earlier

### Added
* Added pre-built wheels and conda packages for Python 3.9

### Changed
* Internal update to PRT 2.4 (CityEngine 2021.0)
* Updated compiler requirements on Windows (MSVC 14.27) and Linux (GCC 9.3)
* Updated urllib3, pywin32 and pillow versions in the environment requirements-py3.*.txt files based on dependabot security analysis

### Removed
* Removed MacOS support as PRT 2.4 and later is not available anymore on that platform

## v1.3.0 (2021-05-12)

### Added
Expand Down
119 changes: 47 additions & 72 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,72 +37,62 @@ env.PIPELINE_ARCHIVING_ALLOWED = "true"
@Field final String SOURCE_STASH = 'pyprt-sources'
@Field String pkgVer = "0.0.0"

@Field final String DOCKER_IMAGE_REV = "v4"

@Field final String DOCKER_AGENT_LINUX = 'centos7-64-d'
@Field final String DOCKER_WS_LINUX = "/tmp/pyprt/ws"

@Field final String DOCKER_AGENT_WINDOWS = 'win19-64-d'
@Field final String DOCKER_WS_WINDOWS = "c:/temp/pyprt/ws"

@Field final Map PY36_CONFIG = [ py: '3.6' ]
@Field final Map PY37_CONFIG = [ py: '3.7' ]
@Field final Map PY38_CONFIG = [ py: '3.8' ]
@Field final Map PY36_CONDA_CONFIG = [ py: '3.6-conda' ]
@Field final Map PY37_CONDA_CONFIG = [ py: '3.7-conda' ]
@Field final Map PY38_CONDA_CONFIG = [ py: '3.8-conda' ]
@Field final Map LINUX_NATIVE_CONFIG = [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC83, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64 ]
@Field final Map WINDOWS_NATIVE_CONFIG = [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC142, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64 ]
@Field final Map PY36 = [ py: '3.6' ]
@Field final Map PY37 = [ py: '3.7' ]
@Field final Map PY38 = [ py: '3.8' ]
@Field final Map PY39 = [ py: '3.9' ]
@Field final Map KIND_WHEEL = [ kind: 'wheel' ]
@Field final Map KIND_CONDA = [ kind: 'conda' ]
@Field final Map LINUX_NATIVE_CONFIG = [ os: cepl.CFG_OS_RHEL7, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_GCC93, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64 ]
@Field final Map WINDOWS_NATIVE_CONFIG = [ os: cepl.CFG_OS_WIN10, bc: cepl.CFG_BC_REL, tc: cepl.CFG_TC_VC1427, cc: cepl.CFG_CC_OPT, arch: cepl.CFG_ARCH_X86_64 ]
@Field final Map LINUX_DOCKER_CONFIG = [ ba: DOCKER_AGENT_LINUX, ws: DOCKER_WS_LINUX ]
@Field final Map WINDOWS_DOCKER_CONFIG = [ ba: DOCKER_AGENT_WINDOWS, ws: DOCKER_WS_WINDOWS ]

@Field final List CONFIGS_PREPARE = [
PY36_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
]

@Field final List CONFIGS_TESTS_PY36 = [
PY36_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
PY36_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
]

@Field final List CONFIGS_TESTS_PY37 = [
PY37_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
]

@Field final List CONFIGS_TESTS_PY38 = [
PY38_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
PY38_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
]

@Field final List CONFIGS_BUILD_WHEELS_PY36 = [
PY36_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
PY36_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
]

@Field final List CONFIGS_BUILD_WHEELS_PY37 = [
PY37_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
]

@Field final List CONFIGS_BUILD_WHEELS_PY38 = [
PY38_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
PY38_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
composeConfig(PY36, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
]

@Field final List CONFIGS_BUILD_CONDA_PY36 = [
PY36_CONDA_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
PY36_CONDA_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
@Field final List CONFIGS_TEST = [
composeConfig(PY36, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY36, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY37, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY38, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY38, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY39, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY39, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
]

@Field final List CONFIGS_BUILD_CONDA_PY37 = [
PY37_CONDA_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
PY37_CONDA_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
@Field final List CONFIGS_BUILD_WHEEL = [
composeConfig(PY36, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY36, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY37, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY38, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY38, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY39, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY39, KIND_WHEEL, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
]

@Field final List CONFIGS_BUILD_CONDA_PY38 = [
PY38_CONDA_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
PY38_CONDA_CONFIG + WINDOWS_DOCKER_CONFIG + WINDOWS_NATIVE_CONFIG,
@Field final List CONFIGS_BUILD_CONDA = [
composeConfig(PY36, KIND_CONDA, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY36, KIND_CONDA, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY37, KIND_CONDA, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY37, KIND_CONDA, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY38, KIND_CONDA, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY38, KIND_CONDA, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
composeConfig(PY39, KIND_CONDA, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
composeConfig(PY39, KIND_CONDA, WINDOWS_NATIVE_CONFIG, WINDOWS_DOCKER_CONFIG),
]

@Field final List CONFIGS_DOC = [
PY36_CONFIG + LINUX_DOCKER_CONFIG + LINUX_NATIVE_CONFIG,
composeConfig(PY36, KIND_WHEEL, LINUX_NATIVE_CONFIG, LINUX_DOCKER_CONFIG),
]


Expand All @@ -127,27 +117,21 @@ papl.finalizeRun('pyprt', env.BRANCH_NAME)

Map taskGenPrepare() {
Map tasks = [:]
tasks << cepl.generateTasks('pyprt-prepare', this.&taskPrepare, CONFIGS_PREPARE)
tasks << cepl.generateTasks('prepare', this.&taskPrepare, CONFIGS_PREPARE)
return tasks
}

Map taskGenTests() {
Map tasks = [:]
tasks << cepl.generateTasks('pyprt-tests-py36', this.&taskRunTests, CONFIGS_TESTS_PY36)
tasks << cepl.generateTasks('pyprt-tests-py37', this.&taskRunTests, CONFIGS_TESTS_PY37)
tasks << cepl.generateTasks('pyprt-tests-py38', this.&taskRunTests, CONFIGS_TESTS_PY38)
tasks << cepl.generateTasks('test', this.&taskRunTests, CONFIGS_TEST)
return tasks
}

Map taskGenPyPRT() {
Map tasks = [:]
tasks << cepl.generateTasks('pyprt-wheel-py36', this.&taskBuildWheel, CONFIGS_BUILD_WHEELS_PY36)
tasks << cepl.generateTasks('pyprt-wheel-py37', this.&taskBuildWheel, CONFIGS_BUILD_WHEELS_PY37)
tasks << cepl.generateTasks('pyprt-wheel-py38', this.&taskBuildWheel, CONFIGS_BUILD_WHEELS_PY38)
tasks << cepl.generateTasks('pyprt-conda-py36', this.&taskBuildConda, CONFIGS_BUILD_CONDA_PY36)
tasks << cepl.generateTasks('pyprt-conda-py37', this.&taskBuildConda, CONFIGS_BUILD_CONDA_PY37)
tasks << cepl.generateTasks('pyprt-conda-py38', this.&taskBuildConda, CONFIGS_BUILD_CONDA_PY38)
tasks << cepl.generateTasks('pyprt-doc', this.&taskBuildDoc, CONFIGS_DOC)
tasks << cepl.generateTasks('build', this.&taskBuildWheel, CONFIGS_BUILD_WHEEL)
tasks << cepl.generateTasks('build', this.&taskBuildConda, CONFIGS_BUILD_CONDA)
tasks << cepl.generateTasks('doc', this.&taskBuildDoc, CONFIGS_DOC)
return tasks;
}

Expand Down Expand Up @@ -250,26 +234,17 @@ def taskRunTests(cfg) {

// -- HELPERS

String getPySuf(cfg) {
return cfg.py.replace(".", "")
}

String getDockerEnvDir(Map cfg) {
String envDir = "envs/"
switch (cfg.os) {
case cepl.CFG_OS_WIN10: envDir += 'windows'; break;
case cepl.CFG_OS_RHEL7: envDir += 'centos7'; break;
default: error("No docker env available for ${cfg.os}")
}
return "${envDir}/py${getPySuf(cfg)}"
@NonCPS
Map composeConfig(py, kind, tc, dc) {
return py + kind + tc + dc + [ grp: "py${py['py']}-${kind['kind']}" ]
}

String getDockerImage(Map cfg) {
String image = 'zrh-dreg-sp-1.esri.com/pyprt/pyprt'

String tag = 'jnk-v1-'
String tag = "jnk-${DOCKER_IMAGE_REV}-"
tag += (cfg.os == cepl.CFG_OS_WIN10) ? 'windows' : (cfg.os == cepl.CFG_OS_RHEL7) ? 'centos7' : error(cfg.os)
tag += "-py${getPySuf(cfg)}-${cfg.tc}"
tag += "-py${cfg.py}-${cfg.kind}-${cfg.tc}"

return "${image}:${tag}"
}
Expand Down
52 changes: 28 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ PyPRT provides a Python binding for PRT (Procedural RunTime) of CityEngine. This
* [Minimal Example](#minimal-example)
* [Documentation](#documentation)
* [Development](#development)
* [License](#license)
* [Licensing Information](#licensing-information)

## Installation

Run `pip install pyprt` in your (virtual) Python environment or `conda install -c esri pyprt` in a Conda environment. Then use `import pyprt` in your scripts.

We provide wheels for Python 3.6 and 3.8 on Linux, Windows and macOS. Additionally, we also provide wheels for Python 3.7 on Windows. Conda packages are available for Python 3.6, 3.7 and 3.8 on Linux, Windows and macOS. For other Python versions please [build](#development) PyPRT yourself.
We provide wheels for Python 3.6, 3.8 and 3.9 on Linux and Windows. Additionally, we also provide wheels for Python 3.7 on Windows. Conda packages are available for Python 3.6, 3.7, 3.8 and 3.9(*) on Linux and Windows. For other Python versions please [build](#development) PyPRT yourself.

(*) A note regarding Python 3.9 and Conda: The arcgis package for Python 3.9 is not yet available in Conda, therefore the arcgis submodule in PyPRT is not yet working with Python 3.9.

## Minimal Example

Expand Down Expand Up @@ -71,9 +73,8 @@ The project is composed of two parts: the C++ native directory (`src`) and Pytho
### Requirements

* C++ Compiler (C++ 17)
* Windows: MSVC 14.23 or later
* Linux: GCC 8 or later (we build and test on RHEL7/CentOS7)
* macOS (Catalina or later): Xcode 11 or later
* Windows: MSVC 14.27 or later
* Linux: GCC 9.3 or later (we build and test on RHEL7/CentOS7)
* Python (version >= 3.6)
* Packages (latest version if not specified): wheel, arcgis 1.8.2, twine, sphinx, pkginfo, xmlrunner
* Optional: Conda (e.g. miniconda3)
Expand All @@ -83,27 +84,26 @@ The project is composed of two parts: the C++ native directory (`src`) and Pytho
A note regarding the meaning of "open a shell" in the following sections: this implies that the shell also needs to have the correct C++ compiler activated:

* On Windows, use the shortcuts provided by Visual Studio or run `vcvarsall.bat` of the desired MSVC toolchain.
* On RHEL-based Linux, run e.g. `source /opt/rh/devtoolset-8/enable`.
* On macOS, there is usually no action required (the current Xcode command line tools are activated by default).
* On RHEL-based Linux, run e.g. `source /opt/rh/devtoolset-9/enable`.

_Note: on Windows, replace `bin` with `Scripts` in the following commands. Some commands also differ in their file extension between Linux and Windows (`.sh` vs `.bat` and similar). Please refer to the `venv` documentation for details: <https://docs.python.org/3.6/library/venv.html>_

### Build Python Wheel

1. Open a shell in the PyPRT git root.
1. First time only: set up a virtual Python environment with build dependencies for PyPRT. Adapt `python3.6` and `centos7/py36` to your desired OS/Python combination.
1. First time only: set up a virtual Python environment with build dependencies for PyPRT. Adapt `python3.6` and the `envs` file to your desired OS/Python combination.
1. Create the virtual environment: `python3.6 -m venv .venv`
1. Get latest pip: `.venv/bin/python -m pip install --upgrade pip`
1. Get latest wheel: `.venv/bin/python -m pip install --upgrade wheel`
1. Install build dependencies for PyPRT: `.venv/bin/python -m pip install -r envs/centos7/py36/requirements.txt`
1. Install build dependencies for PyPRT: `.venv/bin/python -m pip install -r envs/centos7/wheel/requirements-py3.6.txt`
1. Run `.venv/bin/python setup.py bdist_wheel`. This will build the CMake project and Python packages.
1. The resulting wheel is written to the temporary `dist` folder.

### Build Conda Package

1. Install Miniconda or Anaconda.
1. Open a shell in the PyPRT git root and activate Miniconda (or Anaconda).
1. First time only: run `conda env create --prefix ./env --file envs/centos7/py36-conda/environment.yml` to create a conda environment with all the required Python packages (adapt `centos7/py36-conda` to your desired OS/Python combination).
1. First time only: run `conda env create --prefix ./env --file envs/centos7/conda/environment-py3.6.yml` to create a conda environment with all the required Python packages (adapt `centos7` and `environment-py3.6.yml` to your desired OS/Python combination).
1. Run `activate ./env`.
1. Run `python setup.py bdist_conda`. This will build the CMake project and Python packages.
1. The resulting package is written to the `./env/conda-bld/{platform}` folder.
Expand Down Expand Up @@ -158,29 +158,33 @@ Note: We only support Docker on Linux and Windows. On Windows, Docker needs to b
#### Build Wheels

1. Open a shell in the PyPRT git root
1. Create the desired image for the build toolchain (adapt `py36` to your desired Python version):
* Linux: `docker build --rm -f envs/centos7/py36/Dockerfile -t pyprt:centos7-py36 --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .`
* Windows: `docker build --rm -f envs\windows\py36\Dockerfile -t pyprt:windows-py36 .`
1. Create the desired image for the build toolchain (adapt to your desired Python version):
* Linux: `docker build --rm -f envs/centos7/wheel/Dockerfile -t pyprt:centos7-py3.6 --build-arg PY_VER=3.6 --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .`
* Windows: `docker build --rm -f envs\windows\wheel\Dockerfile -t pyprt:windows-py3.6 --build-arg PY_VER=3.6 .`
1. Run the build
* Linux: `docker run --rm -v $(pwd):/tmp/pyprt/root -w /tmp/pyprt/root pyprt:centos7-py36 bash -c 'python setup.py bdist_wheel'`
* Windows: `docker run --rm -v %cd%:C:\temp\pyprt\root -w C:\temp\pyprt\root pyprt:windows-py36 cmd /c "python setup.py bdist_wheel"`
* Linux: `docker run --rm -v $(pwd):/tmp/pyprt/root -w /tmp/pyprt/root pyprt:centos7-py3.6 bash -c 'python setup.py bdist_wheel'`
* Windows: `docker run --rm -v %cd%:C:\temp\pyprt\root -w C:\temp\pyprt\root pyprt:windows-py3.6 cmd /c "python setup.py bdist_wheel"`
1. The resulting wheel should appear in the `dist` directory.

#### Build Conda Packages

1. Open a shell in the PyPRT git root
1. Create the desired image for the build toolchain (adapt `py36` to your desired Python version):
* Linux: `docker build --rm -f envs/centos7/py36-conda/Dockerfile -t pyprt:centos7-py36-conda .`
* Windows: `docker build --rm -f envs\windows\py36-conda\Dockerfile -t pyprt:windows-py36-conda .`
1. Create the desired image for the build toolchain (adapt `py3.6` to your desired Python version):
* Linux: `docker build --rm -f envs/centos7/conda/Dockerfile -t pyprt:centos7-py3.6-conda --build-arg PY_VER=3.6 --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .`
* Windows: `docker build --rm -f envs\windows\conda\Dockerfile -t pyprt:windows-py3.6-conda --build-arg PY_VER=3.6 .`
1. Run the build
* Linux: `docker run --rm -v $(pwd):/tmp/pyprt/root -w /tmp/pyprt/root pyprt:centos7-py36-conda bash -c 'python setup.py bdist_conda && cp -r /tmp/pyprt/pyprt-conda-env/conda-bld/linux-64/pyprt*.tar.bz2 /tmp/pyprt/root'`
* Windows: `docker run --rm -v %cd%:C:\temp\pyprt\root -w C:\temp\pyprt\root pyprt:windows-py36-conda cmd /c "python setup.py bdist_conda && copy C:\temp\conda\envs\pyprt\conda-bld\win-64\pyprt-*.tar.bz2 C:\temp\pyprt\root"`
1. The resulting conda package will be located in the current directy (PyPRT git repo root).
* Linux: `docker run --rm -v $(pwd):/tmp/pyprt/root -w /tmp/pyprt/root pyprt:centos7-py3.6-conda bash -c 'python setup.py bdist_conda && cp -r /tmp/pyprt/pyprt-conda-env/conda-bld/linux-64/pyprt*.tar.bz2 /tmp/pyprt/root'`
* Windows: `docker run --rm -v %cd%:C:\temp\pyprt\root -w C:\temp\pyprt\root pyprt:windows-py3.6-conda cmd /c "python setup.py bdist_conda && copy C:\temp\conda\envs\pyprt\conda-bld\win-64\pyprt-*.tar.bz2 C:\temp\pyprt\root"`
1. The resulting conda package will be located in the current directly (PyPRT git repo root).

## Licensing Information

PyPRT is free for personal, educational, and non-commercial use. Commercial use requires at least one commercial license of the latest CityEngine version installed in the organization. Redistribution or web service offerings are not allowed unless expressly permitted.

## License
PyPRT is under the same license as the included [CityEngine SDK](https://github.com/esri/cityengine-sdk#licensing). An exception is the PyPRT source code (without CityEngine SDK, binaries, or object code), which is licensed under the Apache License, Version 2.0 (the “License”); you may not use this work except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0

PyPRT is under the same license as the included [CityEngine SDK](https://github.com/Esri/cityengine-sdk#licensing).
All content in the "Examples" directory/section is licensed under the APACHE 2.0 license as well.

An exception is the PyPRT source code (without CityEngine SDK, binaries, or object code), which is licensed under the Apache License, Version 2.0 (the “License”); you may not use this work except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>.
For questions or enquiries, please contact the Esri CityEngine team ([email protected]).

[Back to top](#table-of-contents)
4 changes: 2 additions & 2 deletions build_and_run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import venv

env_os = "windows" if platform.system() == "Windows" else "centos7"
env_py = f"py{sys.version_info[0]}{sys.version_info[1]}"
env_py = f"py{sys.version_info[0]}.{sys.version_info[1]}"

env_dir = tempfile.TemporaryDirectory(prefix="pyprt-test-venv")
venv.create(env_dir.name, with_pip=True)
Expand All @@ -15,7 +15,7 @@

os.system(f"{py_cmd} -m pip install --upgrade pip")
os.system(f"{py_cmd} -m pip install --upgrade wheel")
os.system(f"{py_cmd} -m pip install -r envs/{env_os}/{env_py}/requirements.txt")
os.system(f"{py_cmd} -m pip install -r envs/{env_os}/wheel/requirements-{env_py}.txt")

os.system(f"{py_cmd} setup.py clean --all")
os.system(f"{py_cmd} setup.py install")
Expand Down
1 change: 1 addition & 0 deletions envs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
Loading

0 comments on commit a50d30d

Please sign in to comment.