-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyPI release & Readme #705
Conversation
as the package will install on machines with python version same or newer than the build env. 3.4 is recommended for htm.core as minimal Py version.
This reverts commit 0901063.
allows easy building on amd64 for arm64, etc
so it can be run as part of release/pypi
as the py version in CI must be older/same as the one on user's machine.
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Set up old Python for PyPI | ||
if: github.event_name == 'push' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to use python 3.4 during Release on linux for compatible "manylinux" PyPI (user's python must be newer/same)
- uses: actions/download-artifact@master | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
with: | ||
name: dist-arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyPI now includes arm64 whl
|
||
|
||
build-arm64-docker: | ||
name: Build for ARM64 on Docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merged the ARM build into this file, for easier integration to PYPI,Release jobs
|
||
## Stage 0: deboostrap: setup cross-compile env | ||
FROM multiarch/qemu-user-static as bootstrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker now automatically resets the platform (so CI, user do not have to do that), allowing easy host-arch cross-compilation.
Docker also creates whl, and tar.gz releases for PyPI and GH Releases
[![Linux/OSX Build Status](https://travis-ci.org/htm-community/htm.core.svg?branch=master)](https://travis-ci.org/htm-community/htm.core) | ||
[![OSX CircleCI](https://circleci.com/gh/htm-community/htm.core/tree/master.svg?style=svg)](https://circleci.com/gh/htm-community/htm.core/tree/master) | ||
[![Windows Build status](https://ci.appveyor.com/api/projects/status/59f87and1x0ugss9/branch/master?svg=true)](https://ci.appveyor.com/project/htm-community/nupic-cpp/branch/master) | ||
[![CI Build Status](https://github.com/htm-community/htm.core/workflows/build/badge.svg)](https://github.com/htm-community/htm.core/actions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed badges after CI switch
Merged to test with tag, please post-review @dkeeney when you have time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of good things have happened while I was away.
This looks good.
RUN python setup.py test #Note, if you get weird import errors here, | ||
# do `git clean -xdf` in your host system, and rerun the docker | ||
|
||
## Stage 2: create release packages (for PyPI, GH Releases) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do users need to know how to build wheels?
I guess it is a good thing to document how to do it for us maintainers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do users need to know how to build wheels?
I don't think so (?)
And we also do it the standard way, python setup.py bdist_wheel
|
||
If you want to use `htm.core` from Python, the easiest method is to install from [PyPI](https://test.pypi.org/project/htm.core/) | ||
``` | ||
python -m pip install -i https://test.pypi.org/simple/ htm.core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have our wheels in pypi.org yet?
I don't think the general public can access test.pypi.org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, not yet.
And there's not too much pressure (atleast until we iron all the bugs in wheels regarding compatibility), yes, anyone can install using the command above. Actually, it's now successfully used in community/NAB repo.
|
||
Be aware that the CMake maintains a cache of build-time arguments and it will ignore some arguments passed | ||
to CMake if is already in the cache. So, between runs you need to clear the cache or even better, | ||
entirely remove the build/ folder. | ||
entirely remove the `build/` folder (ie. `git clean -xdf`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I use rm -r build
.
I did not know that git clean
existed. I will have to give it a try.
Fixes: #19
Fixes: #361