-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #263 from frostming/release/1.2.0
Drop support for Python 3.4
- Loading branch information
Showing
9 changed files
with
56 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
language = "python3" | ||
run = "python setup.py install ; legit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ language: python | |
dist: xenial | ||
python: | ||
- 2.7 | ||
- 3.4 | ||
- 3.5 | ||
- 3.6 | ||
- 3.7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
History | ||
------- | ||
|
||
1.2.0 | ||
+++++ | ||
* Officially drop support for Python 3.4 | ||
|
||
1.1.0 | ||
+++++ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,27 +5,53 @@ | |
import sys | ||
import re | ||
from codecs import open # To use a consistent encoding | ||
from shutil import rmtree | ||
|
||
from setuptools import setup # Always prefer setuptools over distutils | ||
from setuptools import setup, Command # Always prefer setuptools over distutils | ||
|
||
APP_NAME = "legit" | ||
|
||
with open("legit/core.py") as f: | ||
VERSION = re.findall(r'^__version__ *= *[\'"](.+?)[\'"]', f.read(), flags=re.M)[0] | ||
|
||
settings = dict() | ||
|
||
# Grab requirements. | ||
with open("reqs.txt") as f: | ||
required = f.readlines() | ||
|
||
class UploadCommand(Command): | ||
"""Support setup.py upload.""" | ||
|
||
settings = dict() | ||
description = 'Build and publish the package.' | ||
user_options = [] | ||
|
||
@staticmethod | ||
def status(s): | ||
"""Prints things in bold.""" | ||
print('\033[1m{0}\033[0m'.format(s)) | ||
|
||
# Publish Helper. | ||
if sys.argv[-1] == "publish": | ||
os.system("python setup.py sdist bdist_wheel upload") | ||
sys.exit() | ||
def initialize_options(self): | ||
pass | ||
|
||
def finalize_options(self): | ||
pass | ||
|
||
def run(self): | ||
try: | ||
self.status('Removing previous builds...') | ||
rmtree('dist') | ||
except OSError: | ||
pass | ||
|
||
self.status('Building Source and Wheel (universal) distribution...') | ||
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable)) | ||
|
||
self.status('Uploading the package to PyPI via Twine...') | ||
os.system('twine upload dist/*') | ||
|
||
self.status('Pushing git tags...') | ||
os.system('git tag -a {0} -m "v{0}"'.format(VERSION)) | ||
os.system('git push --tags') | ||
|
||
sys.exit() | ||
|
||
|
||
if sys.argv[-1] == "build_manpage": | ||
|
@@ -46,8 +72,15 @@ | |
author_email="[email protected]", | ||
url="https://github.com/frostming/legit", | ||
packages=["legit"], | ||
install_requires=required, | ||
install_requires=[ | ||
'click', | ||
'clint', | ||
'crayons', | ||
'GitPython', | ||
'six' | ||
], | ||
license="BSD", | ||
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
|
@@ -57,12 +90,12 @@ | |
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
], | ||
entry_points={"console_scripts": ["legit = legit.cli:cli"]}, | ||
cmdclass={"publish": UploadCommand} | ||
) | ||
|
||
|
||
|