diff options
| author | Barry Warsaw | 2009-09-25 14:15:12 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-09-25 14:15:12 -0400 |
| commit | 4761ded7d72ada676c61eca523c67a25167e14c8 (patch) | |
| tree | 9bf34c090863954e0e9f51fe7a86b3016d14a231 /setup.py | |
| parent | 7e9654ddc443ae5c53da62cdd144c23b7e41877e (diff) | |
| download | mailman-4761ded7d72ada676c61eca523c67a25167e14c8.tar.gz mailman-4761ded7d72ada676c61eca523c67a25167e14c8.tar.zst mailman-4761ded7d72ada676c61eca523c67a25167e14c8.zip | |
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 36 |
1 files changed, 21 insertions, 15 deletions
@@ -18,33 +18,39 @@ import ez_setup ez_setup.use_setuptools() +import os +import re import sys -from string import Template - -sys.path.insert(0, 'src') -from mailman.version import VERSION as __version__ from setuptools import setup, find_packages +from string import Template - - if sys.hexversion < 0x20600f0: print 'Mailman requires at least Python 2.6' sys.exit(1) +# Calculate the version number without importing the mailman package. +with open('src/mailman/version.py') as fp: + for line in fp: + mo = re.match('VERSION = "(?P<version>[^"]+?)"', line) + if mo: + __version__ = mo.group('version') + print __version__ + break + else: + print 'No version number found' + sys.exit(1) + + # Ensure that all the .mo files are generated from the corresponding .po file. # This procedure needs to be made sane, probably when the language packs are # properly split out. -import os -import mailman.commands -import mailman.messages - # Create the .mo files from the .po files. There may be errors and warnings # here and that could cause the digester.txt test to fail. -start_dir = os.path.dirname(mailman.messages.__file__) +start_dir = os.path.dirname('src/mailman/messages') for dirpath, dirnames, filenames in os.walk(start_dir): for filename in filenames: po_file = os.path.join(dirpath, filename) @@ -70,7 +76,7 @@ scripts = set( setup( name = 'mailman', - version = __version__, + ##version = __version__, description = 'Mailman -- the GNU mailing list manager', long_description= """\ This is GNU Mailman, a mailing list management system distributed under the @@ -100,9 +106,9 @@ case second `m'. Any other spelling is incorrect.""", 'zope.interface', 'zope.schema', ], - setup_requires = [ - 'setuptools_bzr', - ], + ## setup_requires = [ + ## 'setuptools_bzr', + ## ], extras_require=dict( docs=['Sphinx', 'z3c.recipe.sphinxdoc'], ) |
