Skip to content

Commit 0bcad85

Browse files
committed
Merge pull request pypa#14 from qwcode/version_example
defer the topic of single-sourcing the version to the PPUG.
2 parents 47692a8 + a3a7781 commit 0bcad85

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
A sample Python project
22
=======================
33

4-
This project aims to exemplify best practices for *packaging* Python
5-
projects. It is referred to in the `Python Packaging User Guide Tutorial
4+
A sample project that exists as an aid to the `Python Packaging User Guide
5+
Tutorial
66
<https://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.html>`_.

sample/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# The version should comply with PEP440
2-
__version__ = '1.2.0'
31

42
def main():
53
"""Entry point for the application script"""

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import os
44
import re
55

6-
import sample
7-
86
here = os.path.abspath(os.path.dirname(__file__))
97

108
# Get the long description from the relevant file
@@ -14,9 +12,10 @@
1412
setup(
1513
name="sample",
1614

17-
# There are various approaches to referencing the version. For a discussion,
18-
# see http://packaging.python.org/en/latest/tutorial.html#version
19-
version=sample.__version__,
15+
# Versions should comply with PEP440. For a discussion on single-sourcing
16+
# the version across setup.py and the project code, see
17+
# http://packaging.python.org/en/latest/tutorial.html#version
18+
version='1.2.0',
2019

2120
description="A sample Python project",
2221
long_description=long_description,

0 commit comments

Comments
 (0)