Skip to content

Commit

Permalink
Update PyPI packager
Browse files Browse the repository at this point in the history
  • Loading branch information
mbourqui committed May 24, 2020
1 parent 87fdf3a commit 6d579e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pypi_packager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
# converts a README.md to README.rst for nice rendering on PyPI.
#author :https://github.com/mbourqui
#licence :GNU GPL-3.0
#date :20170526
#version :1.2.1
#date :20200523
#version :1.2.3
#usage :bash pypi_packager.sh
#requires :pandoc
#==============================================================================

PROGRAM_NAME=$(basename "$0")
VERSION=1.2.1
VERSION=1.2.3
PROJECT_NAME=$(basename $(pwd))
PACKAGE_NAME=${PROJECT_NAME//-/_} # Replace all - with _

copyright() {
echo "$PROGRAM_NAME Copyright (C) 2017-2018 Marc Bourqui"
echo "$PROGRAM_NAME Copyright (C) 2017-2020 Marc Bourqui"
}

usage() {
Expand Down Expand Up @@ -111,14 +111,14 @@ pandoc --from=markdown --to=rst --output=README.rst README.md
python setup.py sdist

# Wheel
python setup.py bdist_wheel
python setup.py sdist bdist_wheel

if [ -n "$SUBMIT" ]; then
# Pre-registration to PyPI is no longer required or supported, upload
# directly
twine upload dist/*
elif [ -n "$TEST" ]; then
# Upload to TestPyPI
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pip install --index-url https://test.pypi.org/legacy/ $PACKAGE_NAME
twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ --no-deps $PROJECT_NAME
fi

0 comments on commit 6d579e3

Please sign in to comment.