GithubHelp home page GithubHelp logo

regreg-wheels's Introduction

Building and uploading regreg wheels

We automate wheel building using this custom github repository that builds on the travis-ci OSX machines, travis-ci Linux machines, and the Appveyor VMs.

The travis-ci interface for the builds is https://travis-ci.org/regreg/regreg-wheels

Appveyor interface at https://ci.appveyor.com/project/matthew-brett/regreg-wheels

The driving github repository is https://github.com/regreg/regreg-wheels

How it works

The wheel-building repository:

  • does a fresh build of any required C / C++ libraries;
  • builds a regreg wheel, linking against these fresh builds;
  • processes the wheel using delocate (OSX) or auditwheel repair (Manylinux1). delocate and auditwheel copy the required dynamic libraries into the wheel and relinks the extension modules against the copied libraries;
  • uploads the built wheels to http://wheels.scipy.org (a Rackspace container kindly donated by Rackspace to scikit-learn).

The resulting wheels are therefore self-contained and do not need any external dynamic libraries apart from those provided as standard by OSX / Linux as defined by the manylinux1 standard.

The .travis.yml file in this repository has a line containing the API key for the Rackspace container encrypted with an RSA key that is unique to the repository - see http://docs.travis-ci.com/user/encryption-keys. This encrypted key gives the travis build permission to upload to the Rackspace directory pointed to by http://wheels.scipy.org.

Triggering a build

You will likely want to edit the .travis.yml and appveyor.yml files to specify the BUILD_COMMIT before triggering a build - see below.

You will need write permission to the github repository to trigger new builds on the travis-ci interface. Contact us on the mailing list if you need this.

You can trigger a build by:

  • making a commit to the regreg-wheels repository (e.g. with git commit --allow-empty); or
  • clicking on the circular arrow icon towards the top right of the travis-ci page, to rerun the previous build.

In general, it is better to trigger a build with a commit, because this makes a new set of build products and logs, keeping the old ones for reference. Keeping the old build logs helps us keep track of previous problems and successful builds.

Which regreg commit does the repository build?

The regreg-wheels repository will build the commit specified in the BUILD_COMMIT at the top of the .travis.yml and appveyor.yml files. This can be any naming of a commit, including branch name, tag name or commit hash.

Uploading the built wheels to pypi

Be careful, http://wheels.scipy.org points to a container on a distributed content delivery network. It can take up to 15 minutes for the new wheel file to get updated into the container at http://wheels.scipy.org.

The same contents appear at http://8b8c47f30575e674b56d-47bd50c35cd79bd838daf386af554a83.r59.cf2.rackcdn.com you might prefer this address because it is https.

When the wheels are updated, you can download them to your machine manually, and then upload them manually to pypi, or by using twine. You can also use a script for doing this, housed at : https://github.com/MacPython/terryfy/blob/master/wheel-uploader

For the wheel-uploader script, you'll need twine and beautiful soup 4.

You will typically have a directory on your machine where you store wheels, called a wheelhouse. The typical call for wheel-uploader would then be something like:

VERSION=0.1.3
CDN_URL=http://8b8c47f30575e674b56d-47bd50c35cd79bd838daf386af554a83.r59.cf2.rackcdn.com/
wheel-uploader -u $CDN_URL -s -v -w ~/wheelhouse -t macosx regreg $VERSION
wheel-uploader -u $CDN_URL -s -v -w ~/wheelhouse -t manylinux1 regreg $VERSION
wheel-uploader -u $CDN_URL -s -v -w ~/wheelhouse -t win regreg $VERSION

where:

  • -u gives the URL from which to fetch the wheels, here the https address, for some extra security;
  • -s causes twine to sign the wheels with your GPG key;
  • -v means give verbose messages;
  • -w ~/wheelhouse means download the wheels from to the local directory ~/wheelhouse.

regreg is the root name of the wheel(s) to download / upload, and 0.1.0 is the version to download / upload.

In order to use the Warehouse PyPI server, you will need something like this in your ~/.pypirc file:

[distutils]
index-servers =
    pypi

[pypi]
username:your_user_name
password:your_password

So, in this case, wheel-uploader will download all wheels starting with regreg-0.1.0- from http://wheels.scipy.org to ~/wheelhouse, then upload them to PyPI.

Of course, you will need permissions to upload to PyPI, for this to work.

regreg-wheels's People

Contributors

jonathan-taylor avatar matthew-brett avatar

Stargazers

 avatar mnarayan avatar

Watchers

 avatar James Cloos avatar Chris Barker avatar  avatar

regreg-wheels's Issues

Missing some manylinux wheels on pypi?

I've been unable to install regreg under python3.8 using pip on my Linux machine running Pop OS 20.04 LTS (essentially Ubuntu 20.04). I get the following error

ERROR: Could not find a version that satisfies the requirement regreg (from versions: none)
ERROR: No matching distribution found for regreg

I have no issue installing using pip under python2.7, however.

From a bit of poking about, it seems like there are perhaps some missing manylinux wheels for regreg on pypi. Notably, regreg-0.1.3-cp37-cp37m-manylinux1_i686.whl exists, but there's no analogous *x86_64* wheel. I'm not 100% clear on the distinction between e.g., -cp37, -cp37m, and cp37mu (seems like it has something to do with ABI?), but one way or another I think I'd able to handle any of them (my compatibility as revealed by pip debug -v varies depending on whether I use my built-from-source python or a linuxbrew bottle).

Here's my long list of compatible tags (for built-from-source python) obtained from pip debug -v. It looks like going earlier than cp37 would require a rather different ABI flag (although I'm not sure why my system supports cp37m but not cp36m).

Compatible tags: 78
  cp37-cp37m-manylinux2014_x86_64
  cp37-cp37m-manylinux2010_x86_64
  cp37-cp37m-manylinux1_x86_64
  cp37-cp37m-linux_x86_64
  cp37-abi3-manylinux2014_x86_64
  cp37-abi3-manylinux2010_x86_64
  cp37-abi3-manylinux1_x86_64
  cp37-abi3-linux_x86_64
  cp37-none-manylinux2014_x86_64
  cp37-none-manylinux2010_x86_64
  cp37-none-manylinux1_x86_64
  cp37-none-linux_x86_64
  cp36-abi3-manylinux2014_x86_64
  cp36-abi3-manylinux2010_x86_64
  cp36-abi3-manylinux1_x86_64
  cp36-abi3-linux_x86_64
  cp35-abi3-manylinux2014_x86_64
  cp35-abi3-manylinux2010_x86_64
  cp35-abi3-manylinux1_x86_64
  cp35-abi3-linux_x86_64
  cp34-abi3-manylinux2014_x86_64
  cp34-abi3-manylinux2010_x86_64
  cp34-abi3-manylinux1_x86_64
  cp34-abi3-linux_x86_64
  cp33-abi3-manylinux2014_x86_64
  cp33-abi3-manylinux2010_x86_64
  cp33-abi3-manylinux1_x86_64
  cp33-abi3-linux_x86_64
  cp32-abi3-manylinux2014_x86_64
  cp32-abi3-manylinux2010_x86_64
  cp32-abi3-manylinux1_x86_64
  cp32-abi3-linux_x86_64
  py37-none-manylinux2014_x86_64
  py37-none-manylinux2010_x86_64
  py37-none-manylinux1_x86_64
  py37-none-linux_x86_64
  py3-none-manylinux2014_x86_64
  py3-none-manylinux2010_x86_64
  py3-none-manylinux1_x86_64
  py3-none-linux_x86_64
  py36-none-manylinux2014_x86_64
  py36-none-manylinux2010_x86_64
  py36-none-manylinux1_x86_64
  py36-none-linux_x86_64
  py35-none-manylinux2014_x86_64
  py35-none-manylinux2010_x86_64
  py35-none-manylinux1_x86_64
  py35-none-linux_x86_64
  py34-none-manylinux2014_x86_64
  py34-none-manylinux2010_x86_64
  py34-none-manylinux1_x86_64
  py34-none-linux_x86_64
  py33-none-manylinux2014_x86_64
  py33-none-manylinux2010_x86_64
  py33-none-manylinux1_x86_64
  py33-none-linux_x86_64
  py32-none-manylinux2014_x86_64
  py32-none-manylinux2010_x86_64
  py32-none-manylinux1_x86_64
  py32-none-linux_x86_64
  py31-none-manylinux2014_x86_64
  py31-none-manylinux2010_x86_64
  py31-none-manylinux1_x86_64
  py31-none-linux_x86_64
  py30-none-manylinux2014_x86_64
  py30-none-manylinux2010_x86_64
  py30-none-manylinux1_x86_64
  py30-none-linux_x86_64
  cp37-none-any
  py37-none-any
  py3-none-any
  py36-none-any
  py35-none-any
  py34-none-any
  py33-none-any
  py32-none-any
  py31-none-any
  py30-none-any

As a workaround, if there was a source distribution available at pypi I think my system would be able to build from source, since I'm able to create manylinux wheels locally if I clone regreg.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.