Compare commits

...

4 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
5a71bc5e5a Release version 0.37.2 2021-01-01 21:31:06 -05:00
Jose Diaz-Gonzalez
794ccf3996 fix: use distutils.core on error 2021-01-01 21:30:54 -05:00
Jose Diaz-Gonzalez
977424c153 Release version 0.37.1 2021-01-01 21:28:25 -05:00
Jose Diaz-Gonzalez
613576dd25 fix: use twine for releases
The old method of releasing to pypi broke for whatever reason and switching to a supported toolchain is easier than debugging the old one.

Additionally:

- Update gitchangelog
- Fix license entry
- Set long description type
- Gitignore the temporary readme file
2021-01-01 21:28:03 -05:00
5 changed files with 59 additions and 7 deletions

1
.gitignore vendored
View File

@@ -34,3 +34,4 @@ doc/aws_hostname.1
.vscode .vscode
.atom .atom
README

View File

@@ -1,9 +1,39 @@
Changelog Changelog
========= =========
0.37.0 (2021-01-01) 0.37.2 (2021-01-01)
------------------- -------------------
------------ ------------
Fix
~~~
- Use distutils.core on error. [Jose Diaz-Gonzalez]
0.37.1 (2021-01-02)
-------------------
Fix
~~~
- Use twine for releases. [Jose Diaz-Gonzalez]
The old method of releasing to pypi broke for whatever reason and switching to a supported toolchain is easier than debugging the old one.
Additionally:
- Update gitchangelog
- Fix license entry
- Set long description type
- Gitignore the temporary readme file
Other
~~~~~
- Release version 0.37.1. [Jose Diaz-Gonzalez]
0.37.0 (2021-01-02)
-------------------
- Release version 0.37.0. [Jose Diaz-Gonzalez]
- Merge pull request #158 from albertyw/python3. [Jose Diaz-Gonzalez] - Merge pull request #158 from albertyw/python3. [Jose Diaz-Gonzalez]
Remove support for python 2 Remove support for python 2

View File

@@ -1 +1 @@
__version__ = '0.37.0' __version__ = '0.37.2'

10
release
View File

@@ -22,7 +22,7 @@ CYAN="\033[0;36m" # cyan
pip install wheel > /dev/null pip install wheel > /dev/null
command -v gitchangelog >/dev/null 2>&1 || { command -v gitchangelog >/dev/null 2>&1 || {
echo -e "${RED}WARNING: Missing gitchangelog binary, please run: pip install gitchangelog==2.2.0${COLOR_OFF}\n" echo -e "${RED}WARNING: Missing gitchangelog binary, please run: pip install gitchangelog==3.0.4${COLOR_OFF}\n"
exit 1 exit 1
} }
@@ -31,6 +31,11 @@ command -v rst-lint > /dev/null || {
exit 1 exit 1
} }
command -v twine > /dev/null || {
echo -e "${RED}WARNING: Missing twine binary, please run: pip install twine==3.2.0${COLOR_OFF}\n"
exit 1
}
if [[ "$@" != "major" ]] && [[ "$@" != "minor" ]] && [[ "$@" != "patch" ]]; then if [[ "$@" != "major" ]] && [[ "$@" != "minor" ]] && [[ "$@" != "patch" ]]; then
echo -e "${RED}WARNING: Invalid release type, must specify 'major', 'minor', or 'patch'${COLOR_OFF}\n" echo -e "${RED}WARNING: Invalid release type, must specify 'major', 'minor', or 'patch'${COLOR_OFF}\n"
exit 1 exit 1
@@ -125,7 +130,8 @@ git push -q origin master && git push -q --tags
if [[ "$PUBLIC" == "true" ]]; then if [[ "$PUBLIC" == "true" ]]; then
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release" echo -e "${YELLOW}--->${COLOR_OFF} Creating python release"
cp README.rst README cp README.rst README
python setup.py sdist bdist_wheel upload > /dev/null python setup.py sdist bdist_wheel > /dev/null
twine upload dist/*
rm README rm README
fi fi

View File

@@ -1,10 +1,24 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
from setuptools import setup
from github_backup import __version__ from github_backup import __version__
try:
from setuptools import setup
setup # workaround for pyflakes issue #13
except ImportError:
from distutils.core import setup
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
# running python setup.py test (see
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
multiprocessing
except ImportError:
pass
def open_file(fname): def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname)) return open(os.path.join(os.path.dirname(__file__), fname))
@@ -18,7 +32,7 @@ setup(
packages=['github_backup'], packages=['github_backup'],
scripts=['bin/github-backup'], scripts=['bin/github-backup'],
url='http://github.com/josegonzalez/python-github-backup', url='http://github.com/josegonzalez/python-github-backup',
license=open('LICENSE.txt').read(), license='MIT',
classifiers=[ classifiers=[
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
'Topic :: System :: Archiving :: Backup', 'Topic :: System :: Archiving :: Backup',
@@ -30,6 +44,7 @@ setup(
], ],
description='backup a github user or organization', description='backup a github user or organization',
long_description=open_file('README.rst').read(), long_description=open_file('README.rst').read(),
long_description_content_type='text/x-rst',
install_requires=open_file('requirements.txt').readlines(), install_requires=open_file('requirements.txt').readlines(),
zip_safe=True, zip_safe=True,
) )