Skip to content

Commit

Permalink
Simplified version handling (we accept redundancy), added news to lon…
Browse files Browse the repository at this point in the history
…g-description.
  • Loading branch information
carljm committed Mar 15, 2011
1 parent c9a6080 commit 0359cef
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 40 deletions.
19 changes: 2 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,8 @@
#
# The short X.Y version.

## Figure out the version from virtualenv.py:
import re, os
version_re = re.compile(
r'virtualenv_version = "(.*?)"')
fp = open(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
'virtualenv.py'))
version = None
for line in fp:
match = version_re.search(line)
if match:
release = match.group(1)
break
else:
raise Exception("Cannot find version in virtualenv.py")
fp.close()
del re, os, line, fp, version_re
version = '.'.join(release.split('.')[:2])
release = "1.5.2.post1"
version = ".".join(release.split(".")[:2])

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
14 changes: 7 additions & 7 deletions docs/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Changes & News
--------------

tip (unreleased)
----------------
~~~~~~~~~~~~~~~~

* Fixed creation of virtualenvs on Mac OS X when standard library modules
(readline) are installed outside the standard library.

1.5.2
-----
~~~~~

* Moved main repository to Github: https://github.com/pypa/virtualenv

Expand All @@ -23,14 +23,14 @@ tip (unreleased)
* Moved virtualenv to Github at https://github.com/pypa/virtualenv

1.5.1
-----
~~~~~

* Added ``_weakrefset`` requirement for Python 2.7.1.

* Fixed Windows regression in 1.5

1.5
---
~~~

* Include pip 0.8.1.

Expand All @@ -47,12 +47,12 @@ tip (unreleased)
* Add fish and csh activate scripts.

1.4.9
-----
~~~~~

* Include pip 0.7.2

1.4.8
-----
~~~~~

* Fix for Mac OS X Framework builds that use
``--universal-archs=intel``
Expand All @@ -66,7 +66,7 @@ tip (unreleased)
* Include pip 0.7.1

1.4.7
-----
~~~~~

* Include pip 0.7

Expand Down
21 changes: 6 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,24 @@

here = os.path.dirname(os.path.abspath(__file__))

## Figure out the version from virtualenv.py:
version_re = re.compile(
r'virtualenv_version = "(.*?)"')
fp = open(os.path.join(here, 'virtualenv.py'))
version = None
for line in fp:
match = version_re.search(line)
if match:
version = match.group(1)
break
else:
raise Exception("Cannot find version in virtualenv.py")
fp.close()

## Get long_description from index.txt:
f = open(os.path.join(here, 'docs', 'index.txt'))
long_description = f.read().strip()
long_description = long_description.split('split here', 1)[1]
f.close()
f = open(os.path.join(here, 'docs', 'news.txt'))
long_description += "\n\n" + f.read()
f.close()

if 'register' in sys.argv:
if 'hg tip\n~~~~~~' in long_description:
print >> sys.stderr, (
"WARNING: hg tip is in index.txt")

setup(name='virtualenv',
version=version,
# If you change the version here, change it in virtualenv.py and
# docs/conf.py as well
version="1.5.2.post1",
description="Virtual Python Environment builder",
long_description=long_description,
classifiers=[
Expand Down
4 changes: 3 additions & 1 deletion virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"""Create a "virtual" Python installation
"""

virtualenv_version = "1.5.2"
# If you change the version here, change it in setup.py
# and docs/conf.py as well.
virtualenv_version = "1.5.2.post1"

import sys
import os
Expand Down

0 comments on commit 0359cef

Please sign in to comment.