diff --git a/.ci/azure-pipeline-build.yml b/.ci/azure-pipeline-build.yml new file mode 100644 index 0000000..86547a2 --- /dev/null +++ b/.ci/azure-pipeline-build.yml @@ -0,0 +1,130 @@ +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +# Template - you must copy (or symlink) this to your .ci folder +# Packages usually will have a little custom code in here, and +# can override any of the templates from here, as well + +# Builds can always be triggered in the GUI. +trigger: + branches: + include: + - 'refs/tags/*' + +pr: + - master + +# For a master-develop workflow: +# pr: +# - master +# trigger: +# - master + +# You must set the package name here. Optionally change the other variables. +variables: + package_name: pyhepmc_ng + many_linux_base: quay.io/pypa/manylinux1_ + dev_requirements_file: .ci/build-requirements.txt + test_requirements_file: .ci/test-requirements.txt + + +jobs: + +- job: LinuxSDist + pool: + vmImage: 'ubuntu-latest' + variables: + python.architecture: 'none' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.8' + - script: | + python -m pip install --upgrade pip + python -m pip install setuptools + displayName: Install sdist deps + - script: python setup.py sdist + displayName: Prepare sdist + - template: azure-wheel-helpers/azure-publish-dist.yml + +- job: ManyLinux + strategy: + matrix: + 64Bit2010: + arch: x86_64 + plat: manylinux2010_x86_64 + image: quay.io/pypa/manylinux2010_x86_64 + python.architecture: x64 + 64Bit: + arch: x86_64 + plat: manylinux1_x86_64 + image: $(many_linux_base)x86_64 + python.architecture: x64 + 32Bit: + arch: i686 + plat: manylinux1_i686 + image: $(many_linux_base)i686 + python.architecture: x86 + pool: + vmImage: 'ubuntu-latest' + steps: + - template: azure-wheel-helpers/azure-manylinux-wheels.yml + - template: azure-wheel-helpers/azure-publish-dist.yml + +- job: macOS + variables: + python.architecture: 'x64' + strategy: + matrix: + Python27: + python.version: '2.7' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + Python38: + python.version: '3.8' + pool: + vmImage: 'macOS-latest' + steps: + - template: azure-wheel-helpers/azure-setup.yml + - template: azure-wheel-helpers/azure-steps.yml + - template: azure-wheel-helpers/azure-tests.yml + - template: azure-wheel-helpers/azure-publish-dist.yml + +- job: Windows + strategy: + matrix: + Python27: + python.version: '2.7' + python.architecture: 'x64' + Python36: + python.version: '3.6' + python.architecture: 'x64' + Python37: + python.version: '3.7' + python.architecture: 'x64' + Python38: + python.version: '3.8' + python.architecture: 'x64' + Python27_32: + python.version: '2.7' + python.architecture: 'x86' + Python36_32: + python.version: '3.6' + python.architecture: 'x86' + Python37_32: + python.version: '3.7' + python.architecture: 'x86' + Python38_32: + python.version: '3.8' + python.architecture: 'x86' + pool: + vmImage: 'vs2017-win2016' + steps: + - template: azure-wheel-helpers/azure-setup.yml + - template: azure-wheel-helpers/azure-steps.yml + - template: azure-wheel-helpers/azure-tests.yml + - template: azure-wheel-helpers/azure-publish-dist.yml diff --git a/.ci/azure-wheel-helpers/LICENSE b/.ci/azure-wheel-helpers/LICENSE new file mode 100644 index 0000000..17309b8 --- /dev/null +++ b/.ci/azure-wheel-helpers/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Henry Schreiner. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the particle package developers nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.ci/azure-wheel-helpers/README.md b/.ci/azure-wheel-helpers/README.md new file mode 100644 index 0000000..bec2326 --- /dev/null +++ b/.ci/azure-wheel-helpers/README.md @@ -0,0 +1,127 @@ +## Azure Wheel Helpers + +This repository holds a collection of wheel helpers designed by the [Scikit-HEP][] project to build Python Wheels on [Azure DevOps][]. This is designed for packages that require building; if you have a pure-Python project, producing a universal wheel is trivial without this helper collection. This collection assumes some standard paths and procedures, though *some* of them can be customized. + +Azure provides manual pipeline triggering and release pipelines, making it slighly better suited for this than GitHub Actions, though otherwise they are *very* similar. + +### Supported platforms and caveats + +TLDR: Python 2.7, 3.6, 3.7, and 3.8 on all platforms, along with 3.5 on Linux. + +| System | Arch | Python versions | +|---------|-----|------------------| +| SDist (all) | all | any (non-binary distribution) | +| ManyLinux1 | 64 & 32-bit | 2.7, 3.5, 3.6, 3.7, 3.8 | +| ManyLinux2010 | 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8 | +| macOS 10.9+ | 64-bit | 2.7, 3.6, 3.7, 3.8 | +| Windows | 64 & 32-bit | 2.7, 3.6, 3.7, 3.8 | + +* Linux: Python 3.4 is not supported because Numpy does not support it either. +* manylinux1: Optional support for GCC 9.1 using docker image; should work but can't be called directly other compiled extensions unless they do the same thing (think that's the main caveat). Supporting 32 bits because it's there for Numpy and PPA for now. +* manylinux2010: Requires pip 10+ and a version of Linux newer than 2010. This is very new technology. 64-bit only. Eventually this will become the preferred (and then only) way to produce Linux wheels. Optional modern GCC image available. +* MacOS: Uses the dedicated 64 bit 10.9+ Python.org builds. We are not supporting 3.5 because those no longer provide binaries (could use 32+64 fat 10.6+ but really force to 10.9+, but will not be added unless there is a need for it). +* Windows: PyBind11 requires compilation with a newer copy of Visual Studio than Python 2.7's Visual Studio 2008; you need to have the [Visual Studio 2015 distributable][msvc2015] installed (the dll is included in 2017 and 2019, as well). + +[msvc2017]: https://www.microsoft.com/en-us/download/details.aspx?id=48145 + +### Usage + +> Azure does not recognize git submodules during the configure phase. Therefore, we are using git subtree instead. + +This repository should reside in `/.ci` in your project. To add it: + +```bash +git subtree add --prefix .ci/azure-wheel-helpers git@github.com:scikit-hep/azure-wheel-helpers.git master --squash +``` + +You should make a copy of the template pipeline and make local edits: + +```bash +cp .ci/azure-wheel-helpers/azure-pipeline-build.yml .ci/azure-pipeline-build.yml +``` + +Make sure you enable this path in Azure as the pipeline. See [the post here][iscinumpy/wheels] for more details. + +You must set the variables at the top of this file, and remove any configurations (like Windows) that you do not support: + +```yaml +variables: + package_name: my_package # This is the output name, - is replaced by _ + many_linux_base: "quay.io/pypa/manylinux1_" # Could also be "skhep/manylinuxgcc-" + dev_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt + test_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt +``` + +You can adjust the rest of the template as needed. If you need a non-standard procedure, you can change the target of the `template` inputs to a local file. You must have a `test_requirments` file, as the manylinux wheel install test does not pull requirements when testing, and at least pytest is required. + + +#### Updates + +To update, run: + +```bash +git subtree pull --prefix .ci/azure-wheel-helpers git@github.com:scikit-hep/azure-wheel-helpers.git master --squash +``` + +### Common needs + +#### Using numpy with Cython + +If you build with Cython, you will need to require an older version of Numpy. Either place this in your `dev_requirements_file` (classic builds) or your `pyproject.toml` (PEP 517 builds): + +``` +numpy==1.11.3; python_version<="3.5" +numpy==1.12.1; python_version=="3.6" +numpy==1.14.5; python_version=='3.7' +numpy==1.17.3; python_version>='3.8' +``` + +(Note: most of Scikit-HEP officially requires 1.13.3+, so you can simplify this with a single `<='3.6'`) + +#### Using PEP 517 builds + +For PEP 517 builds, you need to have a pyproject.toml file. Then, for PIP > 10, the build happens in a +custom environment that has *only* the packages you request. It replaces the deprecated and mostly non-functional `setup_requires` in setup.py, and even lets you select a build system other than setuptools. If you just use it as a replacement for `setup_requires`, you can still support pip < 10; users will just have to manually install the requirements (usually Numpy) beforehand. Here's an example of a Cython PEP 517 build: + +```toml +[build-system] +requires = [ + "setuptools>=18.0", + "wheel", + "Cython>=0.29.13", + "numpy==1.13.3; python_version<='3.6'", + "numpy==1.14.5; python_version=='3.7'", + "numpy==1.17.3; python_version>='3.8'", +] +``` + +Now, in `setup.py`, just `import numpy` and use it, no need to check to see if it there, etc. + +#### Using Numpy parallel compile + +If you have numpy available, you can add parallel compiles trivially: + +```python +# Use -j N or set the environment variable NPY_NUM_BUILD_JOBS +from numpy.distutils.ccompiler import CCompiler_compile +import distutils.ccompiler +distutils.ccompiler.CCompiler.compile = CCompiler_compile +``` + +#### Using Cython + Setuptools + +Since `setuptools>=18.0`, you can now pass `.pyx` files directly as sources to `Extension`, and they get Cythonized for you! You just need Cython installed. + +### License + +Copyright (c) 2019, Henry Schreiner. + +Distributed under the 3-clause BSD license, see accompanying file LICENSE +or for details. + + +[Scikit-HEP]: http://scikit-hep.org +[Azure DevOps]: https://dev.azure.com +[iscinumpy/wheels]: https://iscinumpy.gitlab.io/post/azure-devops-python-wheels/ +[msvc2017]: https://www.microsoft.com/en-us/download/details.aspx?id=48145 + diff --git a/.ci/azure-wheel-helpers/azure-manylinux-wheels.yml b/.ci/azure-wheel-helpers/azure-manylinux-wheels.yml new file mode 100644 index 0000000..879c9d3 --- /dev/null +++ b/.ci/azure-wheel-helpers/azure-manylinux-wheels.yml @@ -0,0 +1,24 @@ + +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +steps: +- script: | + docker run --rm \ + -e NPY_NUM_BUILD_JOBS=4 \ + -e PLAT=$(plat) \ + -e package_name=$(package_name) \ + -e dev_requirements_file='$(dev_requirements_file)' \ + -e test_requirements_file='$(test_requirements_file)' \ + -v $PWD:/io \ + $(image) \ + /io/.ci/azure-wheel-helpers/build-wheels.sh + displayName: Build wheels + +- script: | + ls -lh wheelhouse/ + mkdir -p dist + cp wheelhouse/$(package_name)*.whl dist/. + displayName: Show and copy wheels diff --git a/.ci/azure-wheel-helpers/azure-pipeline-build.yml b/.ci/azure-wheel-helpers/azure-pipeline-build.yml new file mode 100644 index 0000000..ad61950 --- /dev/null +++ b/.ci/azure-wheel-helpers/azure-pipeline-build.yml @@ -0,0 +1,131 @@ +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +# Template - you must copy (or symlink) this to your .ci folder +# Packages usually will have a little custom code in here, and +# can override any of the templates from here, as well + +# Builds can always be triggered in the GUI. +trigger: + branches: + include: + - 'refs/tags/*' + +pr: none + +# For a master-develop workflow: +# pr: +# - master +# trigger: +# - master + + + +# You must set the package name here. Optionally change the other variables. +variables: + package_name: + many_linux_base: quay.io/pypa/manylinux1_ + dev_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt + test_requirements_file: .ci/azure-wheel-helpers/empty-requirements.txt + + +jobs: + +- job: LinuxSDist + pool: + vmImage: 'ubuntu-latest' + variables: + python.architecture: 'none' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.8' + - script: | + python -m pip install --upgrade pip + python -m pip install setuptools + displayName: Install sdist deps + - script: python setup.py sdist + displayName: Prepare sdist + - template: azure-wheel-helpers/azure-publish-dist.yml + +- job: ManyLinux + strategy: + matrix: + 64Bit2010: + arch: x86_64 + plat: manylinux2010_x86_64 + image: quay.io/pypa/manylinux2010_x86_64 + python.architecture: x64 + 64Bit: + arch: x86_64 + plat: manylinux1_x86_64 + image: $(many_linux_base)x86_64 + python.architecture: x64 + 32Bit: + arch: i686 + plat: manylinux1_i686 + image: $(many_linux_base)i686 + python.architecture: x86 + pool: + vmImage: 'ubuntu-latest' + steps: + - template: azure-wheel-helpers/azure-manylinux-wheels.yml + - template: azure-wheel-helpers/azure-publish-dist.yml + +- job: macOS + variables: + python.architecture: 'x64' + strategy: + matrix: + Python27: + python.version: '2.7' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + Python38: + python.version: '3.8' + pool: + vmImage: 'macOS-latest' + steps: + - template: azure-wheel-helpers/azure-setup.yml + - template: azure-wheel-helpers/azure-steps.yml + - template: azure-wheel-helpers/azure-tests.yml + - template: azure-wheel-helpers/azure-publish-dist.yml + +- job: Windows + strategy: + matrix: + Python27: + python.version: '2.7' + python.architecture: 'x64' + Python36: + python.version: '3.6' + python.architecture: 'x64' + Python37: + python.version: '3.7' + python.architecture: 'x64' + Python38: + python.version: '3.8' + python.architecture: 'x64' + Python27_32: + python.version: '2.7' + python.architecture: 'x86' + Python36_32: + python.version: '3.6' + python.architecture: 'x86' + Python37_32: + python.version: '3.7' + python.architecture: 'x86' + Python38_32: + python.version: '3.8' + python.architecture: 'x86' + pool: + vmImage: 'vs2017-win2016' + steps: + - template: azure-wheel-helpers/azure-setup.yml + - template: azure-wheel-helpers/azure-steps.yml + - template: azure-wheel-helpers/azure-tests.yml + - template: azure-wheel-helpers/azure-publish-dist.yml diff --git a/.ci/azure-wheel-helpers/azure-publish-dist.yml b/.ci/azure-wheel-helpers/azure-publish-dist.yml new file mode 100644 index 0000000..8525da7 --- /dev/null +++ b/.ci/azure-wheel-helpers/azure-publish-dist.yml @@ -0,0 +1,12 @@ +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +steps: +- task: PublishPipelineArtifact@0 + inputs: + artifactName: 'wheel_$(Agent.OS)_$(Agent.JobName)_$(python.architecture)' + targetPath: 'dist' + +# Artifacts are attached to the build, and are published with an Azure release pipeline. diff --git a/.ci/azure-wheel-helpers/azure-setup.yml b/.ci/azure-wheel-helpers/azure-setup.yml new file mode 100644 index 0000000..fe5d066 --- /dev/null +++ b/.ci/azure-wheel-helpers/azure-setup.yml @@ -0,0 +1,28 @@ +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +# This is special for macOS because "UsePythonVersion" +# does not use the official Python.org installers. + +steps: + +- script: ./macos-install-python.sh '$(python.version)' + workingDirectory: .ci/azure-wheel-helpers + displayName: Install Python.org Python + condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) + +- task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: '$(python.architecture)' + condition: and(succeeded(), ne(variables['Agent.OS'], 'Darwin')) + +- script: | + mkdir -p dist + python -m pip install --upgrade pip + python -m pip install --upgrade pytest wheel twine setuptools + python -m pip install -r $(dev_requirements_file) + displayName: 'Install dependencies' + diff --git a/.ci/azure-wheel-helpers/azure-steps.yml b/.ci/azure-wheel-helpers/azure-steps.yml new file mode 100644 index 0000000..91f909a --- /dev/null +++ b/.ci/azure-wheel-helpers/azure-steps.yml @@ -0,0 +1,35 @@ +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +steps: + +- script: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" $(python.architecture) + set MSSdk=1 + set DISTUTILS_USE_SDK=1 + python -m pip wheel . -w wheelhouse/ + displayName: 'Build wheel (Windows Python 2.7)' + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['python.version'], '2.7')) + +- script: | + python -m pip wheel . -w wheelhouse/ + displayName: 'Build wheel' + condition: and(succeeded(), not(and(eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['python.version'], '2.7')))) + +- script: | + ls -lh wheelhouse + mkdir -p dist + cp wheelhouse/$(package_name)* dist/. + displayName: 'Show wheelhouse' + +- script: | + python -m pip install $(package_name) --no-index -f wheelhouse + displayName: 'Install wheel' + +- script: | + python -m pip install delocate + /Library/Frameworks/Python.framework/Versions/$(python.version)/bin/delocate-wheel dist/$(package_name)*.whl + displayName: 'Delocate wheels' + condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) diff --git a/.ci/azure-wheel-helpers/azure-tests.yml b/.ci/azure-wheel-helpers/azure-tests.yml new file mode 100644 index 0000000..4f1bf07 --- /dev/null +++ b/.ci/azure-wheel-helpers/azure-tests.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +steps: +- script: | + python -m pip install -U pytest pytest-cov pytest-azurepipelines + displayName: Install Azure testing requirements + +- script: | + python -m pip install -r $(test_requirements_file) + displayName: Install testing requirements + +- script: | + python -m pytest --cov $(project_name) --cov-report html + workingDirectory: tests + displayName: Test with pytest diff --git a/.ci/azure-wheel-helpers/build-wheels.sh b/.ci/azure-wheel-helpers/build-wheels.sh new file mode 100755 index 0000000..976e05e --- /dev/null +++ b/.ci/azure-wheel-helpers/build-wheels.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +# Based on https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh +# with CC0 license here: https://github.com/pypa/python-manylinux-demo/blob/master/LICENSE + +set -e -x +echo "$dev_requirements_file, $test_requirements_file" + +# Collect the pythons +pys=(/opt/python/*/bin) + +# Print list of Python's available +echo "All Pythons: ${pys[@]}" + +# Filter out Python 3.4 +pys=(${pys[@]//*34*/}) + +# Print list of Python's being used +echo "Using Pythons: ${pys[@]}" + +# Compile wheels +for PYBIN in "${pys[@]}"; do + "${PYBIN}/pip" install -r /io/$dev_requirements_file + "${PYBIN}/pip" wheel /io/ -w wheelhouse/ +done + +# Bundle external shared libraries into the wheels +for whl in wheelhouse/$package_name-*.whl; do + auditwheel repair --plat $PLAT "$whl" -w /io/wheelhouse/ +done + +# Install packages and test +for PYBIN in "${pys[@]}"; do + "${PYBIN}/pip" install -r /io/$test_requirements_file + "${PYBIN}/pip" install $package_name --no-index -f /io/wheelhouse + if [ -d "/io/tests" ]; then + "${PYBIN}/pytest" /io/tests + else + "${PYBIN}/pytest" --pyargs $package_name + fi +done diff --git a/.ci/azure-wheel-helpers/empty-requirements.txt b/.ci/azure-wheel-helpers/empty-requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.ci/azure-wheel-helpers/macos-install-python.sh b/.ci/azure-wheel-helpers/macos-install-python.sh new file mode 100755 index 0000000..4f3cbec --- /dev/null +++ b/.ci/azure-wheel-helpers/macos-install-python.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# Copyright (c) 2019, Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/azure-wheel-helpers for details. + +PYTHON_VERSION="$1" + +case $PYTHON_VERSION in +2.7) + FULL_VERSION=2.7.17 + ;; +3.6) + FULL_VERSION=3.6.8 + ;; +3.7) + FULL_VERSION=3.7.5 + ;; +3.8) + FULL_VERSION=3.8.0 + ;; +esac + +INSTALLER_NAME=python-$FULL_VERSION-macosx10.9.pkg +URL=https://www.python.org/ftp/python/$FULL_VERSION/$INSTALLER_NAME + +PY_PREFIX=/Library/Frameworks/Python.framework/Versions + +set -e -x + +curl $URL > $INSTALLER_NAME + +sudo installer -pkg $INSTALLER_NAME -target / + +sudo rm /usr/local/bin/python +sudo ln -s /usr/local/bin/python$PYTHON_VERSION /usr/local/bin/python + +which python +python --version +python -m ensurepip +python -m pip install setuptools twine wheel numpy diff --git a/.ci/build-requirements.txt b/.ci/build-requirements.txt new file mode 100644 index 0000000..2f6c76e --- /dev/null +++ b/.ci/build-requirements.txt @@ -0,0 +1,4 @@ +pybind11 +numpy +graphviz +particle \ No newline at end of file diff --git a/.ci/test-requirements.txt b/.ci/test-requirements.txt new file mode 100644 index 0000000..e559c40 --- /dev/null +++ b/.ci/test-requirements.txt @@ -0,0 +1,5 @@ +pybind11 +numpy +graphviz +particle +pytest \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8602087..fdfd856 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ tests/__pycache__ .compiler_support_cache .flag_filter_cache .pytest_cache -py?? \ No newline at end of file +py?? +.ci_bak diff --git a/.gitmodules b/.gitmodules index 6ae0ec1..ed6dfc3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "extern/HepMC3"] - path = extern/HepMC3 - url = https://gitlab.cern.ch/hdembins/HepMC3.git [submodule "extern/pybind11"] path = extern/pybind11 url = https://github.com/pybind/pybind11.git +[submodule "extern/HepMC3"] + path = extern/HepMC3 + url = https://gitlab.cern.ch/hepmc/HepMC3.git diff --git a/README.md b/README.md index f8e8e5f..1994045 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ A Python wrapper for the HepMC3 C++ library. [![PyPI version](https://badge.fury.io/py/pyhepmc-ng.svg)](https://badge.fury.io/py/pyhepmc-ng) [![Build Status](https://travis-ci.org/scikit-hep/pyhepmc.svg?branch=master)](https://travis-ci.org/scikit-hep/pyhepmc) +[![Build Status](https://dev.azure.com/afedynitch/EventGenerators/_apis/build/status/afedynitch.pyhepmc?branchName=master)](https://dev.azure.com/afedynitch/EventGenerators/_build/latest?definitionId=5&branchName=master) Another wrapper is [pyhepmc](https://pypi.org/project/pyhepmc/). Why should you use this one? **pyhepmc-ng is easy to install** -The command `pip install pyhepmc-ng` just works! You only need a compiler that -supports C++11, everything else is handled by pip. +The command `pip install pyhepmc-ng` should work on all Python versions > 2.7 and all common architectures. Under the hood, the bindings are build with the excellent [pybind11](http://pybind11.readthedocs.io/en/stable/) library. External installations of pybind11 or HepMC3 are not required, pyhepmc-ng includes the lightweight source code of both libraries with the submodule feature of `git`. diff --git a/extern/HepMC3 b/extern/HepMC3 index f885510..c1e721e 160000 --- a/extern/HepMC3 +++ b/extern/HepMC3 @@ -1 +1 @@ -Subproject commit f885510b27c5d3b52ce3eb07c54d93a6f9f16a50 +Subproject commit c1e721e357fe481fa08b4d40e44b3144c1311ad5 diff --git a/setup.py b/setup.py index a993860..581a116 100644 --- a/setup.py +++ b/setup.py @@ -130,6 +130,7 @@ def get_description(): "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8" ], keywords="generator montecarlo simulation data hep physics particle", packages=find_packages("src"), diff --git a/src/pyhepmc_ng/_version.py b/src/pyhepmc_ng/_version.py index 8c2cebc..cabe76e 100644 --- a/src/pyhepmc_ng/_version.py +++ b/src/pyhepmc_ng/_version.py @@ -1 +1 @@ -version = '0.4.3' +version = '0.4.4'