Skip to content

Commit

Permalink
Merge pull request #263 from frostming/release/1.2.0
Browse files Browse the repository at this point in the history
Drop support for Python 3.4
  • Loading branch information
frostming authored Dec 10, 2019
2 parents 4cd3812 + 81b0554 commit 79dbd77
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language = "python3"
run = "python setup.py install ; legit"
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: python
dist: xenial
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
Expand Down
4 changes: 4 additions & 0 deletions HISTORY.rst
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
+++++

Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ The Installation
.. image:: https://img.shields.io/coveralls/github/frostming/legit.svg
:target: https://coveralls.io/r/frostming/legit/

.. image:: https://repl.it/badge/github/frostming/legit
:target: https://repl.it/github/frostming/legit


From `PyPI <https://pypi.python.org/pypi/legit/>`_ with the Python package manager::

Expand Down
2 changes: 1 addition & 1 deletion legit/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def do_edit_settings(fake):
if fake:
click.echo(crayons.red('Faked! >>> edit {}'.format(path)))
else:
click.edit(path)
click.edit(filename=path)


def handle_abort(aborted, type=None):
Expand Down
2 changes: 1 addition & 1 deletion legit/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
from . import bootstrap
del bootstrap

__version__ = '1.1.0'
__version__ = '1.2.0'
__author__ = 'Kenneth Reitz'
__license__ = 'BSD'
2 changes: 1 addition & 1 deletion legit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def black(s, **kwargs):
if legit_settings.allow_black_foreground:
return crayons.black(s, **kwargs)
else:
return s.encode('utf-8')
return s


def git_version():
Expand Down
5 changes: 0 additions & 5 deletions reqs.txt

This file was deleted.

55 changes: 44 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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",
Expand All @@ -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}
)


Expand Down

0 comments on commit 79dbd77

Please sign in to comment.