Skip to content
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

Merged
merged 18 commits into from
Oct 4, 2019
Merged

PyPI release & Readme #705

merged 18 commits into from
Oct 4, 2019

Conversation

breznak
Copy link
Member

@breznak breznak commented Oct 3, 2019

  • fix pip install on linux
  • improve Dockerfile for ARM64
  • arm builds now part of whl/releases
  • updated README

Fixes: #19
Fixes: #361

uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Set up old Python for PyPI
if: github.event_name == 'push'
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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)
Copy link
Member Author

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

@breznak breznak requested a review from dkeeney October 4, 2019 01:31
@breznak breznak merged commit 3c00af2 into master Oct 4, 2019
@breznak breznak deleted the pip_5 branch October 4, 2019 01:33
@breznak
Copy link
Member Author

breznak commented Oct 4, 2019

Merged to test with tag, please post-review @dkeeney when you have time

@breznak breznak mentioned this pull request Oct 4, 2019
Copy link

@dkeeney dkeeney left a 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)
Copy link

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.

Copy link
Member Author

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
Copy link

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.

Copy link
Member Author

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`).
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide binary releases Publish bindings on pypi
2 participants