diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1ee8618..be05ce1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,36 +1,168 @@ -# Python package -# Create and test a Python package on multiple Python versions. -# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/python +jobs: +- job: 'TestLinux' + pool: + vmImage: 'ubuntu-latest' + strategy: + matrix: + Python39-Linux: + python.version: '3.9' + maxParallel: 3 + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + - script: sudo apt-get update + displayName: 'AptGet Update' + - script: sudo apt-get install -y pandoc + displayName: 'Install Pandoc' + - script: sudo apt-get install -y texlive texlive-latex-extra texlive-xetex dvipng + displayName: 'Install Latex' + - script: sudo apt-get install -y p7zip-full + displayName: 'Install 7z, rar' + - script: sudo apt-get install -y inkscape + displayName: 'Install Inkscape' + - script: sudo apt-get install -y graphviz + displayName: 'Install Graphviz' + - script: python -m pip install --upgrade pip setuptools wheel + displayName: 'Install tools' + - script: pip install -r requirements.txt + displayName: 'Install Requirements' + - script: python -c "import platform;print(platform.version())" + displayName: 'Platform' + - script: | + python -u setup.py build_ext --inplace + displayName: 'Build inplace' + - script: | + python -u setup.py unittests + displayName: 'Runs Unit Tests' + - script: | + python -u setup.py bdist_wheel + displayName: 'Build Package' +# - script: | +# python -u setup.py build_sphinx +# displayName: 'Builds Documentation' + - script: | + python -m pip install cibuildwheel + export CIBW_MANYLINUX_X86_64_IMAGE="manylinux2014" + export CIBW_BEFORE_BUILD="pip install ." + export CIBW_BEFORE_BUILD="pip install pybind11 cython numpy scipy pyquickhelper" + export CIBW_BUILD="cp37-manylinux_x86_64 cp38-manylinux_x86_64" + # cp39-manylinux_x86_64 seems broken. + python -m cibuildwheel --output-dir dist/wheelhouse --platform linux + displayName: 'Build Package manylinux2014' + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'wheel-linux-$(python.version)' + targetPath: 'dist' -trigger: -- main +- job: 'TestWindows' + pool: + vmImage: 'windows-latest' + strategy: + matrix: + Python39-Linux: + python.version: '3.9' + maxParallel: 3 + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + - script: python -m pip install --upgrade pip setuptools wheel + displayName: 'Install tools' + - script: pip install -r requirements.txt + displayName: 'Install Requirements' + - script: python -c "import platform;print(platform.version())" + displayName: 'Platform' + - script: | + python -u setup.py bdist_wheel + displayName: 'Build Package' + - script: | + python -m pip install cibuildwheel + set CIBW_BEFORE_BUILD=pip install . + set CIBW_BEFORE_BUILD=pip install pybind11 cython numpy scipy pyquickhelper + set CIBW_BUILD=cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 + python -m cibuildwheel --output-dir dist/wheelhouse + displayName: 'Build Package many' + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'wheel-linux-$(python.version)' + targetPath: 'dist' -pool: - vmImage: 'ubuntu-latest' -strategy: - matrix: - Python27: - python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' - -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' - -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies' - -- script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'pytest' +- job: 'TestMac' + pool: + vmImage: 'macOS-latest' + strategy: + matrix: + Python39-Mac: + python.version: "3.9" + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + - script: gcc --version + displayName: 'gcc version' + - script: | + brew update + displayName: 'brew update' + - script: export + displayName: 'export' + - script: gcc --version + displayName: 'gcc version' + - script: brew install llvm + displayName: 'install llvm' + - script: brew install libomp + displayName: 'Install omp' + # already installed + #- script: brew install p7zip + # displayName: 'Install p7zip' + - script: brew install pandoc + displayName: 'Install Pandoc' + - script: brew install graphviz + continueOnError: true + displayName: 'Install Graphviz' + - script: brew install pybind11 + displayName: 'Install pybind11' + - bash: echo "##vso[task.prependpath]$CONDA/bin" + displayName: Add conda to PATH. + - bash: sudo chown -R $USER $CONDA + displayName: Take ownership of conda installation + - bash: conda update conda --yes --quiet + displayName: Update conda. + - bash: conda info -a + - bash: conda create --yes --quiet --name pyenv -c defaults -c conda-forge python=$PYTHON_VERSION tox sphinx jupyter Cython numpy mkl scipy scikit-learn pandas coverage pylint + displayName: Create Anaconda environment. + - bash: conda list + - bash: | + source activate pyenv + # - script: brew install --cask mactex + # displayName: 'Install latex' + #- script: python -m pip install --upgrade pip setuptools wheel + # displayName: 'Install tools' + - script: pip install -r requirements.txt + displayName: 'Install Requirements' + - script: python -c "import platform;print(platform.version())" + displayName: 'Platform' + - script: | + # export MACOSX_DEPLOYMENT_TARGET=10.13 + python setup.py build_ext --inplace + displayName: 'Build package' + - script: | + python -u setup.py unittests + displayName: 'Runs Unit Tests' + - script: | + python -u setup.py bdist_wheel + displayName: 'Build Package' + - script: | + python -m pip install cibuildwheel + export CIBW_BEFORE_BUILD="pip install ." + export CIBW_BEFORE_BUILD="pip install pybind11 cython numpy scipy pyquickhelper" + export CIBW_BUILD="cp37-macosx_x86_64 cp38-macosx_x86_64 cp39-macosx_x86_64" + python -m cibuildwheel --output-dir dist/wheelhouse + displayName: 'Build Package many' + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'wheel-mac-$(python.version)' + targetPath: 'dist' diff --git a/src/wrapclib/__init__.py b/src/wrapclib/__init__.py index 7037d8d..3116a1f 100644 --- a/src/wrapclib/__init__.py +++ b/src/wrapclib/__init__.py @@ -5,7 +5,7 @@ :epkg:`Python` + some C libraries. """ -__version__ = "0.1.51" +__version__ = "0.1.56" __author__ = "Xavier Dupré" __github__ = "https://github.com/sdpython/wrapclib" __url__ = "http://www.xavierdupre.fr/app/wrapclib/helpsphinx/index.html"