Mercurial > p > roundup > code
comparison setup.py @ 4033:bca7c59ac400
Enhance documentation generation.
| author | Stefan Seefeld <stefan@seefeld.name> |
|---|---|
| date | Thu, 12 Feb 2009 05:54:26 +0000 |
| parents | 5bf05d2b3cf8 |
| children | e233d7a66343 |
comparison
equal
deleted
inserted
replaced
| 4032:a73bac81eda2 | 4033:bca7c59ac400 |
|---|---|
| 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 18 # | 18 # |
| 19 # $Id: setup.py,v 1.105 2008-09-01 01:58:32 richard Exp $ | 19 # $Id: setup.py,v 1.105 2008-09-01 01:58:32 richard Exp $ |
| 20 | 20 |
| 21 | |
| 22 from roundup.dist.command.build_doc import build_doc | |
| 21 from distutils.core import setup, Extension | 23 from distutils.core import setup, Extension |
| 22 from distutils.util import get_platform | 24 from distutils.util import get_platform |
| 23 from distutils.file_util import write_file | 25 from distutils.file_util import write_file |
| 24 from distutils.command.bdist_rpm import bdist_rpm | 26 from distutils.command.bdist_rpm import bdist_rpm |
| 25 from distutils.command.build import build | 27 from distutils.command.build import build |
| 34 if not hasattr(DistributionMetadata, 'classifiers'): | 36 if not hasattr(DistributionMetadata, 'classifiers'): |
| 35 DistributionMetadata.classifiers = None | 37 DistributionMetadata.classifiers = None |
| 36 DistributionMetadata.download_url = None | 38 DistributionMetadata.download_url = None |
| 37 | 39 |
| 38 from roundup import msgfmt | 40 from roundup import msgfmt |
| 41 | |
| 42 def include(d, e): | |
| 43 """Generate a pair of (directory, file-list) for installation. | |
| 44 | |
| 45 'd' -- A directory | |
| 46 | |
| 47 'e' -- A glob pattern""" | |
| 48 | |
| 49 return (d, [f for f in glob('%s/%s'%(d, e)) if os.path.isfile(f)]) | |
| 39 | 50 |
| 40 ############################################################################# | 51 ############################################################################# |
| 41 ### Build script files | 52 ### Build script files |
| 42 ############################################################################# | 53 ############################################################################# |
| 43 | 54 |
| 338 # add message files | 349 # add message files |
| 339 for (_dist_file, _mo_file) in list_message_files(): | 350 for (_dist_file, _mo_file) in list_message_files(): |
| 340 installdatafiles.append((os.path.dirname(_mo_file), | 351 installdatafiles.append((os.path.dirname(_mo_file), |
| 341 [os.path.join("build", _mo_file)])) | 352 [os.path.join("build", _mo_file)])) |
| 342 | 353 |
| 354 # add docs | |
| 355 installdatafiles.append(include(os.path.join('share', 'doc', 'roundup', 'html'), '*')) | |
| 356 | |
| 343 # perform the setup action | 357 # perform the setup action |
| 344 from roundup import __version__ | 358 from roundup import __version__ |
| 345 setup_args = { | 359 setup_args = { |
| 346 'name': "roundup", | 360 'name': "roundup", |
| 347 'version': __version__, | 361 'version': __version__, |
| 420 'Topic :: Software Development :: Bug Tracking', | 434 'Topic :: Software Development :: Bug Tracking', |
| 421 ], | 435 ], |
| 422 | 436 |
| 423 # Override certain command classes with our own ones | 437 # Override certain command classes with our own ones |
| 424 'cmdclass': { | 438 'cmdclass': { |
| 439 'build_doc': build_doc, | |
| 425 'build_scripts': build_scripts_roundup, | 440 'build_scripts': build_scripts_roundup, |
| 426 'build_py': build_py_roundup, | 441 'build_py': build_py_roundup, |
| 427 'build': build_roundup, | 442 'build': build_roundup, |
| 428 'bdist_rpm': bdist_rpm_roundup, | 443 'bdist_rpm': bdist_rpm_roundup, |
| 429 }, | 444 }, |
