• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    PowerShell
  • License
    Creative Commons ...
  • Created over 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Demo project for building Python wheels with appveyor.com

python-appveyor-demo

AppVeyor

Demo project for building Windows Python wheels using https://appveyor.com. It supports both Python 2 and 3 on 32 and 64 bit architectures.

AppVeyor is a continuous integration platform similar to travis-ci.org but for the Windows platform. AppVeyor is free for Open Source projects and runs on the Microsoft Azure cloud infrastructure.

This sample Python project has a simple C compiled extension (statically generated from a Cython source file in this case). The build itself is configured by in the setup.py file.

This project is meant to document a minimalistic yet working example to help other Python project maintainers.

Continuous integration setup with AppVeyor

The appveyor.yml file in this repo configures a Windows build environment for both for 32 bit and 64 bit Python compiled extensions. This demo project is configured to trigger build jobs at:

https://ci.appveyor.com/project/ogrisel/python-appveyor-demo

In particular:

  • the appveyor/install.ps1 powershell script downloads and installs Python and and pip to grab all the development dependencies of the project as registered in the dev-requirements.txt file.

  • the appveyor/run_in_env.cmd batch script configures environment variables to activate the MSVC++ compiler from the Windows SDK matching the Python version and architecture.

The content of the dist/ folder (typically hosting the generated .whl packages) is archived in the build report (see previous link).

Note: it is possible to activate the "Rolling builds" option to automatically cancel build on intermediate push events to avoid clogging the build queue with useless jobs. However it can be problematic as it can cancel builds triggered by direct push to master outside of any PR. Instead the appveyor.yml file of this repo uses a specific powershell snippet to quickly fail if a newer build is queued for the same PR.

Building and testing locally from source

Here are the instructions to replicate the build steps manually.

Install developer dependencies (only nose and wheel at this time):

pip install -r dev-requirements.txt

You can then build with:

python setup.py sdist bdist_wheel

The generated source tarball and platform specific .whl package can be found in the dist subfolder.

Install the .whl package with with:

pip install dist/python_appveyor_demo-1.0-*.whl

Finally run the tests (from any folder by the source tree):

nosetests -v pyappveyordemo

Under Windows will need a Windows SDK to build the compiled extension with the MSVC++ compilers. See the following for details:

https://github.com/cython/cython/wiki/CythonExtensionsOnWindows

Credits

Thanks to Feodor Fitsner (@FeodorFitsner) from AppVeyor for the fast support and for installing the old versions of the Windows SDK required to build Python projects.

Thanks to Thomas Conté (@tomconte) from Microsoft for your help in scripting Windows SDKs and MSVC build environments usage.

License

The source code in this repo is either licensed under CC0 (see LICENSE) or the following MIT license at your choice:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

parallel_ml_tutorial

Tutorial on scikit-learn and IPython for parallel machine learning
Jupyter Notebook
1,589
star
2

notebooks

Some sample IPython notebooks for scikit-learn
Jupyter Notebook
556
star
3

pygbm

Experimental Gradient Boosting Machines in Python with numba.
Python
178
star
4

pignlproc

Apache Pig utilities to build training corpora for machine learning / NLP out of public Wikipedia and DBpedia dumps.
Java
159
star
5

docker-distributed

Experimental docker-compose setup to bootstrap distributed on a docker-swarm cluster.
Shell
92
star
6

spylearn

Repo for experiments on pyspark and sklearn
Python
79
star
7

paper2ebook

Utility to re-structure research papers published in US Letter or A4 format PDF files to typically remove the 2 columns layout.
Java
53
star
8

text-mining-class

Introduction to web scraping and text mining
Python
43
star
9

dbpediakit

Python utilities to do work with the DBpedia dumps for analytics.
Python
38
star
10

euroscipy-2022-time-series

Tutorial on time-series forcasting with scikit-learn
Jupyter Notebook
32
star
11

wheelhouse-uploader

Script to help maintain a wheelhouse folder on a cloud storage.
Python
31
star
12

my-linux-devbox

Vagrant / Salt configuration with Ubuntu to work on projects related to the scipy stack under Python 3 and Python 2
Scheme
26
star
13

oglearn

ogrisel's utility extensions for scikit-learn
Python
24
star
14

eegssl

Experiments on Self-Supervised Learning on EEG data
Python
16
star
15

mahout

Personal development repository to prepare contributions and patches for Apache Mahout
Java
15
star
16

euroscipy_2017_sklearn

Notebooks for the EuroScipy 2017 tutorial (based on Adult Census income data)
Jupyter Notebook
15
star
17

corpusmaker

clojure utilities to build training corpora for machine learning / NLP out of public wikimedia dumps: status - partially stalled - will probably be reworked as cascalog scripts -- this project is in stalled mode right now: the pignlproc project is likely to replace it due to licensing constraints for future integration in Apache projects
Clojure
14
star
18

python-winbuilder

Tools to script a build environment on Windows for Python project
Python
9
star
19

codemaker

Neural nets-based utility to build low dimensional codes or/and sparse codes
Python
9
star
20

pycon-pydata-sprint

Experimental work for using IPython.parallel with scikit-learn
Python
8
star
21

salt-ipcluster

Salt states and modules to setup an IPython cluster
Scheme
7
star
22

docker-openblas

Docker container with an automated build for OpenBLAS stable branch:
Shell
5
star
23

stanbol-isbn

Demo stanbol extension for detecting and linking ISBN in text document
Java
5
star
24

silva

Leaf recognition prototype
4
star
25

bbuzz-semantic-hackathon

Sandbox for the Berlin Buzzwords semantic hackathon
Java
3
star
26

research

Draft research notes, code and todos
Jupyter Notebook
3
star
27

scikit-learn-github-actions

Test repo for github actions workflows
Python
2
star
28

ipython-azure

Utilities to deploy a IPython parallel cluster on Windows Azure
Python
2
star
29

lsh_glove

Script to build various LSH / ANN indices on glove word embeddings
Python
2
star
30

cardice

Cloud compute cluster setup with SaltStack
Python
2
star
31

energy_charts

Jupyter Notebook
2
star
32

decks

Slide decks for conferences
CSS
2
star
33

brain2vec

Brain embedding by contextual predictions (draft)
Python
2
star
34

instrumentalist

Python scripts to read XBee sensor data and push it to a couchdb database
Python
2
star
35

mnist-sbi

Simulation Based Inference for the important problem of drawing digits
Python
2
star
36

scikit-learn.org

Source repository to build the HTML website for the scikit-learn project.
Python
1
star
37

camera-html5

Test repo for HTML5 camera access on mobile phones
1
star
38

sandbox

1
star
39

cpython-nightly

Automated build of the master branch of CPython for Continuous Integration purposes
1
star
40

docker-sklearn-openblas

Shell
1
star
41

us-housing-prices-v2-parquet

Exploratory Data Analysis on a parquet dump of https://www.dolthub.com/repositories/dolthub/us-housing-prices-v2 using duckdb and Ibis
Jupyter Notebook
1
star