Skip to content

Commit

Permalink
ARROW-8165: [Packaging] Make nightly wheels available on a PyPI server
Browse files Browse the repository at this point in the history
Uploaded wheels are available at https://pypi.fury.io/ursa-labs/

Considered Bintray, but it doesn't provide any facilities for listing the wheels, although Artifactory could be a good solution, but it only has paid plans hosted on-prem at AWS.

Gemfury seems like a good solution, pros:
- it supports multiple repositories which can be relevant for us (nuget, npm, deb, rpm, gem)
- seems to be free and unlimited for public packages
- no client needed, simple curl command is enough to upload the binaries

Closes #6669 from kszucs/gemfury

Authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kszucs authored and kou committed Mar 24, 2020
1 parent 8642a1e commit c06f838
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dev/tasks/conda-recipes/azure.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ jobs:
CROSSBOW_GITHUB_TOKEN: $(CROSSBOW_GITHUB_TOKEN)
displayName: Upload packages as a GitHub release
{% if arrow.branch == 'master' %}
# Upload to custom anaconda channel
- script: |
anaconda -t $(CROSSBOW_ANACONDA_TOKEN) upload -l nightly --force build_artifacts/linux-64/*.tar.bz2
displayName: Upload packages to Anaconda
{% endif %}
2 changes: 2 additions & 0 deletions dev/tasks/conda-recipes/azure.osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ jobs:
CROSSBOW_GITHUB_TOKEN: $(CROSSBOW_GITHUB_TOKEN)
displayName: Upload packages as a GitHub release
{% if arrow.branch == 'master' %}
# Upload to custom anaconda channel
- script: |
source activate base
conda install -y anaconda-client
anaconda -t $(CROSSBOW_ANACONDA_TOKEN) upload -l nightly --force build_artifacts/osx-64/*.tar.bz2
displayName: Upload packages to Anaconda
workingDirectory: arrow/dev/tasks/conda-recipes
{% endif %}
2 changes: 2 additions & 0 deletions dev/tasks/conda-recipes/azure.win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ jobs:
CROSSBOW_GITHUB_TOKEN: $(CROSSBOW_GITHUB_TOKEN)
displayName: Upload packages as a GitHub release
{% if arrow.branch == 'master' %}
# Upload to custom anaconda channel
- script: |
source activate base
conda install -y anaconda-client
anaconda -t $(CROSSBOW_ANACONDA_TOKEN) upload -l nightly --force D:\bld\win-64\*.tar.bz2
displayName: Upload packages to Anaconda
workingDirectory: arrow/dev/tasks/conda-recipes
{% endif %}
1 change: 1 addition & 0 deletions dev/tasks/crossbow.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ def github_upload_asset_curl(self, release, path, name, mime):

command = [
'curl',
'--fail',
'-H', "Authorization: token {}".format(self.github_token),
'-H', "Content-Type: {}".format(mime),
'--data-binary', '@{}'.format(path),
Expand Down
6 changes: 6 additions & 0 deletions dev/tasks/python-wheels/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ build_script:
after_build:
# the artifacts must be uploaded from a directory relative to the build root
- xcopy %ARROW_SRC%\python\dist\* wheels\
{% if arrow.branch == 'master' %}
# upload to gemfury
- conda install -y curl
- for /f %%i in ('dir /b wheels\*.whl') do set WHEEL_PATH=wheels\%%i
- curl.exe -f -F "package=@%WHEEL_PATH%" "https://%CROSSBOW_GEMFURY_TOKEN%@push.fury.io/ursa-labs/"
{% endif %}

#on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
Expand Down
10 changes: 10 additions & 0 deletions dev/tasks/python-wheels/azure.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,13 @@ jobs:
env:
CROSSBOW_GITHUB_TOKEN: $(CROSSBOW_GITHUB_TOKEN)
displayName: Upload packages as a GitHub release
{% if arrow.branch == 'master' %}
# upload to gemfury
- script: |
path=$(ls arrow/python/{{ wheel_dir }}/dist/*.whl)
curl -f -F "package=@${path}" https://${CROSSBOW_GEMFURY_TOKEN}@push.fury.io/ursa-labs/
env:
CROSSBOW_GEMFURY_TOKEN: $(CROSSBOW_GEMFURY_TOKEN)
displayName: Upload packages to Gemfury
{% endif %}
15 changes: 14 additions & 1 deletion dev/tasks/python-wheels/travis.osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,23 @@ install:
- sudo mv $(brew --cellar){.bak,}
# before_install activates a virtualenv but we need the system python3
- deactivate

# crossbow dependencies for deployment
- unset MACOSX_DEPLOYMENT_TARGET
- pip3 install click ruamel.yaml setuptools_scm github3.py toolz requests[security]
- python3 arrow/dev/tasks/crossbow.py --queue-path $(pwd) --queue-remote {{ queue.remote_url }} upload-artifacts --sha {{ task.branch }} --tag {{ task.tag }} --pattern "arrow/python/dist/*.whl"
- python3 arrow/dev/tasks/crossbow.py
--queue-path $(pwd)
--queue-remote {{ queue.remote_url }}
upload-artifacts
--sha {{ task.branch }}
--tag {{ task.tag }}
--pattern "arrow/python/dist/*.whl"

{% if arrow.branch == 'master' %}
# upload to gemfury pypi repository, there should be a single wheel
- path=$(ls arrow/python/dist/*.whl)
- curl -f -F "package=@${path}" https://${CROSSBOW_GEMFURY_TOKEN}@push.fury.io/ursa-labs/
{% endif %}

notifications:
email:
Expand Down

0 comments on commit c06f838

Please sign in to comment.