Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit d907d3b

Browse files
committed
Use setuptools_scm to get version from Git tag, and automatically provide versions
1 parent 9df7657 commit d907d3b

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

MANIFEST.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
include AUTHORS
2-
include LICENSE
3-
include README
1+
prune .github
2+
prune tests
3+
prune utils
4+
exclude .coveragerc
5+
exclude .gitignore
6+
exclude README.md

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
with open("README") as f:
44
long_description = f.read()
55

6-
version = '1.18.0'
6+
7+
def local_scheme(version):
8+
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
9+
to be able to upload to Test PyPI"""
10+
return ""
711

812
setup(name='twitter',
9-
version=version,
1013
description="An API and command-line toolset for Twitter (twitter.com)",
1114
long_description=long_description,
1215
long_description_content_type="text/markdown",
@@ -40,6 +43,8 @@
4043
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
4144
include_package_data=True,
4245
zip_safe=True,
46+
use_scm_version={"local_scheme": local_scheme},
47+
setup_requires=["setuptools_scm"],
4348
entry_points="""
4449
# -*- Entry points: -*-
4550
[console_scripts]

0 commit comments

Comments
 (0)