Skip to content

Commit 9683e8d

Browse files
paulmelnikowtheacodes
authored andcommitted
SIngle-sourcing the package version: Remove a py2-only option; simplify a py3 option (#605)
* SIngle-sourcing the package version: Remove a py2-only option Thanks for this guide! I was using this and tried `execfile()` without realizing it didn't work in Python 3. I thought about leaving the Python 2 version here with a disclaimer, though this list is already very long, and it seems more helpful to steer people toward a good solution than to exhaustively document an obsolete solution. * Simplify py3 version * Update source/guides/single-sourcing-package-version.rst Co-Authored-By: paulmelnikow <github@paulmelnikow.com>
1 parent 68404db commit 9683e8d

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

source/guides/single-sourcing-package-version.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,6 @@ number of your project:
4848
your project (e.g. :file:`version.py`), then have :file:`setup.py` read and
4949
``exec`` the value into a variable.
5050

51-
Using ``execfile``:
52-
53-
::
54-
55-
execfile('...sample/version.py')
56-
# now we have a `__version__` variable
57-
# later on we use: __version__
58-
59-
Using ``exec``:
60-
6151
::
6252

6353
version = {}

0 commit comments

Comments
 (0)