Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use setuptools_scm to simplify versioning during release #34

Merged
merged 4 commits into from
Feb 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v1.26.2
rev: v2.0.1
hooks:
- id: pyupgrade

Expand All @@ -21,12 +21,12 @@ repos:
- id: isort

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.4.4
rev: v1.5.1
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v2.5.0
hooks:
- id: check-merge-conflict
- id: check-yaml
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

5 changes: 3 additions & 2 deletions prettytable.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

__version__ = "trunk"

import copy
import csv
import itertools
Expand All @@ -43,6 +41,9 @@
import textwrap
import unicodedata

import pkg_resources

__version__ = pkg_resources.get_distribution(__name__).version
py3k = sys.version_info[0] >= 3
if py3k:
unicode = str
Expand Down
32 changes: 19 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
#!/usr/bin/env python
from setuptools import setup

from prettytable import __version__ as version

with open("README.md") as f:
long_description = f.read()


def local_scheme(version):
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
to be able to upload to Test PyPI"""
return ""


setup(
name="prettytable",
version=version,
description="A simple Python library for easily displaying tabular data in a "
"visually appealing ASCII table format",
long_description=long_description,
long_description_content_type="text/markdown",
author="Luke Maurits",
author_email="luke@maurits.id.au",
maintainer="Jazzband",
url="https://github.com/jazzband/prettytable",
project_urls={"Source": "https://github.com/jazzband/prettytable"},
license="BSD (3 clause)",
use_scm_version={"local_scheme": local_scheme},
setup_requires=["setuptools_scm"],
extras_require={"tests": ["pytest", "pytest-cov"]},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
classifiers=[
Expand All @@ -23,15 +38,6 @@
"License :: OSI Approved :: BSD License",
"Topic :: Text Processing",
],
license="BSD (3 clause)",
description="A simple Python library for easily displaying tabular data in a "
"visually appealing ASCII table format",
long_description=long_description,
long_description_content_type="text/markdown",
author="Luke Maurits",
author_email="luke@maurits.id.au",
maintainer="Jazzband",
url="https://github.com/jazzband/prettytable",
py_modules=["prettytable"],
test_suite="prettytable_test",
)