Skip to content

Commit

Permalink
Merge branch 'issue_1032-pypi'
Browse files Browse the repository at this point in the history
  • Loading branch information
ajohns committed Mar 3, 2021
2 parents f47bd52 + 672ac3e commit 71c97c0
Show file tree
Hide file tree
Showing 13 changed files with 110 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# * Build-system dependent;
# * Platform dependent.
#
name: Core
name: core
on:
pull_request:
paths-ignore:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Installation
name: installation
on:
push:
paths-ignore:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MacOS
name: mac
on:
pull_request:
paths-ignore:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: pypi
on:
release:
types: [released]

jobs:
publish:
name: Publish to PyPi
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 2.7

- name: Install Dependencies
run: |
pip install wheel twine
- name: Build rez
run: |
python setup.py sdist bdist_wheel
- name: Upload to PyPi
run: |
python -m twine upload dist/*
env:
TWINE_USERNAME: '${{ secrets.PYPI_USERNAME }}'
TWINE_PASSWORD: '${{ secrets.PYPI_PASSWORD }}'
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sphinx
name: sphinx
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ubuntu
name: ubuntu
on:
pull_request:
paths-ignore:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/wiki-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# This workflow just ensures the wiki builds correctly, it doesn't publish
# anything. See wiki-publish.yaml for publishing the wiki.
#

name: wiki-build
on:
push:
paths:
- '.github/workflows/wiki-build.yaml'
- 'wiki/**'
- src/rez/rezconfig.py
env:
CLONE_URL: "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git"

jobs:
build:
name: Build Wiki Artifact
runs-on: ubuntu-latest
env:
TEMP_WIKI_DIR: "wiki/.rez-gen-wiki-tmp"

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required to generate credits list

- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Build Wiki
working-directory: wiki
run: |
rezver=$(cat ./src/rez/utils/_version.py | grep -w _rez_version | tr '"' ' ' | awk '{print $NF}')
python update-wiki.py \
--keep-temp \
--no-push \
--github-release=${rezver} \
--wiki-dir="${{ github.workspace }}"/"${{ env.TEMP_WIKI_DIR }}" \
--wiki-url="${{ env.CLONE_URL }}"
35 changes: 17 additions & 18 deletions .github/workflows/wiki.yaml → .github/workflows/wiki-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Wiki
name: wiki-publish
on:
push:
branches:
- master
paths:
- '.github/workflows/wiki.yaml'
- 'wiki/**'
- src/rez/rezconfig.py
release:
types: [released]
env:
CLONE_URL: "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git"

jobs:

# Note: Identical to 'build' job in wiki-build.yaml. Ideally would like to
# use the artifact generated from that instead, however github's interworkflow
# support isn't great yet. Specifically we would run wiki-publish only when
# wiki-build ran and uploaded its artifact previously.
#
build:
name: Build Wiki Artifact
runs-on: ubuntu-latest
Expand All @@ -20,46 +21,44 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required to calc credits list
fetch-depth: 0 # required to generate credits list

- uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Get Rez Version
- name: Build Wiki
working-directory: wiki
run: |
rezver=$(cat ./src/rez/utils/_version.py | grep -w _rez_version | tr '"' ' ' | awk '{print $NF}')
echo "rezver=${rezver}" >> $GITHUB_ENV
- name: Build Wiki
working-directory: wiki # Start in correct dir, else inspect fails
run: |
python update-wiki.py \
--keep-temp \
--no-push \
--github-release=${rezver} \
--wiki-dir="${{ github.workspace }}"/"${{ env.TEMP_WIKI_DIR }}" \
--wiki-url="${{ env.CLONE_URL }}"
- uses: actions/upload-artifact@v1.0.0
- uses: actions/upload-artifact@v2
with:
name: wiki-markdown
path: ${{ env.TEMP_WIKI_DIR }}


publish:
name: Publish to GitHub Wiki
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v2
with:
workflow: wiki-build.yaml
workflow_conclusion: success
name: wiki-markdown
path: .

- name: Setup git config
run: |
git config --global color.ui always
git config --global user.name "github.com/${{ github.actor }}"
git config --global user.email "${{ github.actor }}@${{ github.sha }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# - Github offers its own package registry. Pushing to is broken in the BETA
# https://github.community/t5/GitHub-Actions/Docker-Push-to-Package-Registry-from-Windows/m-p/36393#M2560

name: Compose Windows Docker Image
name: windows-docker-image

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# .github/workflows/windows-docker-image.yaml
#

name: Windows
name: windows

on:
pull_request:
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[![MacOS](https://github.com/nerdvegas/rez/workflows/MacOS/badge.svg?branch=master)](https://github.com/nerdvegas/rez/actions?query=workflow%3AMacOS+branch%3Amaster)
[![Windows](https://github.com/nerdvegas/rez/workflows/Windows/badge.svg?branch=master)](https://github.com/nerdvegas/rez/actions?query=workflow%3AWindows+branch%3Amaster)


![logo](media/rez_banner_256.png)

- [What Is Rez?](#what-is-rez)
- [The Basics](#the-basics)
- [Examples](#examples)
Expand Down
14 changes: 10 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,20 @@ def find_files(pattern, path=None, root="rez"):
return paths


this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md')) as f:
long_description = f.read()


setup(
name="rez",
version=_rez_version,
description=("A cross-platform packaging system that can build and "
"install multiple version of packages, and dynamically "
"configure resolved environments at runtime."),
keywords="package resolve version build install software management",
long_description=None,
long_description=long_description,
long_description_content_type='text/markdown',
url="https://github.com/nerdvegas/rez",
author="Allan Johns",
author_email="nerdvegas@gmail.com",
Expand All @@ -59,11 +65,11 @@ def find_files(pattern, path=None, root="rez"):
},
include_package_data=True,
zip_safe=False,
package_dir = {'': 'src'},
package_dir={'': 'src'},
packages=find_packages('src', exclude=["build_utils",
"build_utils.*",
"tests"]),
package_data = {
package_data={
'rez':
['utils/logging.conf'] +
['README*'] +
Expand All @@ -77,7 +83,7 @@ def find_files(pattern, path=None, root="rez"):
find_files('rezguiconfig', root='rezgui') +
find_files('*', 'icons', root='rezgui')
},
classifiers = [
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Intended Audience :: Developers",
Expand Down
2 changes: 1 addition & 1 deletion src/rez/utils/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


# Update this value to version up Rez. Do not place anything else in this file.
_rez_version = "2.73.0"
_rez_version = "2.73.9"


# Copyright 2013-2016 Allan Johns.
Expand Down

0 comments on commit 71c97c0

Please sign in to comment.