PageRenderTime 46ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/master/setup.py

https://github.com/djmitche/buildbot
Python | 559 lines | 513 code | 15 blank | 31 comment | 5 complexity | 3f7128b467f9474bbf6680ce3daa5b45 MD5 | raw file
Possible License(s): GPL-2.0
  1. #!/usr/bin/env python
  2. #
  3. # This file is part of Buildbot. Buildbot is free software: you can
  4. # redistribute it and/or modify it under the terms of the GNU General Public
  5. # License as published by the Free Software Foundation, version 2.
  6. #
  7. # This program is distributed in the hope that it will be useful, but WITHOUT
  8. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. # details.
  11. #
  12. # You should have received a copy of the GNU General Public License along with
  13. # this program; if not, write to the Free Software Foundation, Inc., 51
  14. # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. #
  16. # Copyright Buildbot Team Members
  17. """
  18. Standard setup script.
  19. """
  20. from __future__ import absolute_import
  21. from __future__ import print_function
  22. import glob
  23. import inspect
  24. import os
  25. import pkg_resources
  26. import sys
  27. from distutils.command.install_data import install_data
  28. from distutils.command.sdist import sdist
  29. from distutils.version import LooseVersion
  30. from setuptools import setup
  31. from buildbot import version
  32. if "bdist_wheel" in sys.argv:
  33. BUILDING_WHEEL = True
  34. else:
  35. BUILDING_WHEEL = False
  36. def include(d, e):
  37. """Generate a pair of (directory, file-list) for installation.
  38. 'd' -- A directory
  39. 'e' -- A glob pattern"""
  40. return (d, [f for f in glob.glob('%s/%s' % (d, e)) if os.path.isfile(f)])
  41. def include_statics(d):
  42. r = []
  43. for root, ds, fs in os.walk(d):
  44. r.append((root, [os.path.join(root, f) for f in fs]))
  45. return r
  46. class install_data_twisted(install_data):
  47. """make sure data files are installed in package.
  48. this is evil.
  49. copied from Twisted/setup.py.
  50. """
  51. def finalize_options(self):
  52. self.set_undefined_options('install',
  53. ('install_lib', 'install_dir'),
  54. )
  55. install_data.finalize_options(self)
  56. def run(self):
  57. install_data.run(self)
  58. # ensure there's a buildbot/VERSION file
  59. fn = os.path.join(self.install_dir, 'buildbot', 'VERSION')
  60. open(fn, 'w').write(version)
  61. self.outfiles.append(fn)
  62. class our_sdist(sdist):
  63. def make_release_tree(self, base_dir, files):
  64. sdist.make_release_tree(self, base_dir, files)
  65. # ensure there's a buildbot/VERSION file
  66. fn = os.path.join(base_dir, 'buildbot', 'VERSION')
  67. open(fn, 'w').write(version)
  68. # ensure that NEWS has a copy of the latest release notes, with the
  69. # proper version substituted
  70. src_fn = os.path.join('docs', 'relnotes/index.rst')
  71. with open(src_fn) as f:
  72. src = f.read()
  73. src = src.replace('|version|', version)
  74. dst_fn = os.path.join(base_dir, 'NEWS')
  75. with open(dst_fn, 'w') as f:
  76. f.write(src)
  77. def define_plugin_entry(name, module_name):
  78. """
  79. helper to produce lines suitable for setup.py's entry_points
  80. """
  81. if isinstance(name, tuple):
  82. entry, name = name
  83. else:
  84. entry = name
  85. return '%s = %s:%s' % (entry, module_name, name)
  86. def concat_dicts(*dicts):
  87. result = dict()
  88. for d in dicts:
  89. result.update(d)
  90. return result
  91. def define_plugin_entries(groups):
  92. """
  93. helper to all groups for plugins
  94. """
  95. result = dict()
  96. for group, modules in groups:
  97. tempo = []
  98. for module_name, names in modules:
  99. tempo.extend([define_plugin_entry(name, module_name)
  100. for name in names])
  101. result[group] = tempo
  102. return result
  103. __file__ = inspect.getframeinfo(inspect.currentframe()).filename
  104. with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as long_d_f:
  105. long_description = long_d_f.read()
  106. setup_args = {
  107. 'name': "buildbot",
  108. 'version': version,
  109. 'description': "The Continuous Integration Framework",
  110. 'long_description': long_description,
  111. 'author': "Brian Warner",
  112. 'author_email': "warner-buildbot@lothar.com",
  113. 'maintainer': "Dustin J. Mitchell",
  114. 'maintainer_email': "dustin@v.igoro.us",
  115. 'url': "http://buildbot.net/",
  116. 'license': "GNU GPL",
  117. 'classifiers': [
  118. 'Development Status :: 5 - Production/Stable',
  119. 'Environment :: No Input/Output (Daemon)',
  120. 'Environment :: Web Environment',
  121. 'Intended Audience :: Developers',
  122. 'License :: OSI Approved :: GNU General Public License (GPL)',
  123. 'Topic :: Software Development :: Build Tools',
  124. 'Topic :: Software Development :: Testing',
  125. 'Programming Language :: Python :: 2',
  126. 'Programming Language :: Python :: 2.7',
  127. 'Programming Language :: Python :: 3',
  128. 'Programming Language :: Python :: 3.4',
  129. 'Programming Language :: Python :: 3.5',
  130. 'Programming Language :: Python :: 3.6'
  131. ],
  132. 'packages': [
  133. "buildbot",
  134. "buildbot.buildslave",
  135. "buildbot.configurators",
  136. "buildbot.worker",
  137. "buildbot.worker.protocols",
  138. "buildbot.changes",
  139. "buildbot.clients",
  140. "buildbot.data",
  141. "buildbot.db",
  142. "buildbot.db.migrate.versions",
  143. "buildbot.db.types",
  144. "buildbot.monkeypatches",
  145. "buildbot.mq",
  146. "buildbot.plugins",
  147. "buildbot.process",
  148. "buildbot.process.users",
  149. "buildbot.reporters",
  150. "buildbot.schedulers",
  151. "buildbot.scripts",
  152. "buildbot.secrets",
  153. "buildbot.secrets.providers",
  154. "buildbot.statistics",
  155. "buildbot.statistics.storage_backends",
  156. "buildbot.status",
  157. "buildbot.steps",
  158. "buildbot.steps.package",
  159. "buildbot.steps.package.deb",
  160. "buildbot.steps.package.rpm",
  161. "buildbot.steps.source",
  162. "buildbot.util",
  163. "buildbot.wamp",
  164. "buildbot.www",
  165. "buildbot.www.hooks",
  166. "buildbot.www.authz",
  167. ] + ([] if BUILDING_WHEEL else [ # skip tests for wheels (save 50% of the archive)
  168. "buildbot.test",
  169. "buildbot.test.util",
  170. "buildbot.test.fake",
  171. "buildbot.test.fuzz",
  172. "buildbot.test.integration",
  173. "buildbot.test.regressions",
  174. "buildbot.test.unit",
  175. ]),
  176. 'data_files': [
  177. ("buildbot", [
  178. "buildbot/buildbot.png",
  179. ]),
  180. include("buildbot/reporters/templates", "*.txt"),
  181. ("buildbot/db/migrate", [
  182. "buildbot/db/migrate/migrate.cfg",
  183. ]),
  184. include("buildbot/db/migrate/versions", "*.py"),
  185. ("buildbot/scripts", [
  186. "buildbot/scripts/sample.cfg",
  187. "buildbot/scripts/buildbot_tac.tmpl",
  188. ]),
  189. include("buildbot/spec", "*.raml"),
  190. include("buildbot/spec/types", "*.raml"),
  191. include("buildbot/test/unit/test_templates_dir", "*.html"),
  192. include("buildbot/test/unit/test_templates_dir/plugin", "*.*"),
  193. ] + include_statics("buildbot/www/static"),
  194. 'cmdclass': {'install_data': install_data_twisted,
  195. 'sdist': our_sdist},
  196. 'entry_points': concat_dicts(define_plugin_entries([
  197. ('buildbot.changes', [
  198. ('buildbot.changes.mail', [
  199. 'MaildirSource', 'CVSMaildirSource',
  200. 'SVNCommitEmailMaildirSource',
  201. 'BzrLaunchpadEmailMaildirSource']),
  202. ('buildbot.changes.bitbucket', ['BitbucketPullrequestPoller']),
  203. ('buildbot.changes.github', ['GitHubPullrequestPoller']),
  204. ('buildbot.changes.bonsaipoller', ['BonsaiPoller']),
  205. ('buildbot.changes.gerritchangesource', ['GerritChangeSource']),
  206. ('buildbot.changes.gitpoller', ['GitPoller']),
  207. ('buildbot.changes.hgpoller', ['HgPoller']),
  208. ('buildbot.changes.p4poller', ['P4Source']),
  209. ('buildbot.changes.pb', ['PBChangeSource']),
  210. ('buildbot.changes.svnpoller', ['SVNPoller'])
  211. ]),
  212. ('buildbot.schedulers', [
  213. ('buildbot.schedulers.basic', [
  214. 'SingleBranchScheduler', 'AnyBranchScheduler']),
  215. ('buildbot.schedulers.dependent', ['Dependent']),
  216. ('buildbot.schedulers.triggerable', ['Triggerable']),
  217. ('buildbot.schedulers.forcesched', ['ForceScheduler']),
  218. ('buildbot.schedulers.timed', [
  219. 'Periodic', 'Nightly', 'NightlyTriggerable']),
  220. ('buildbot.schedulers.trysched', [
  221. 'Try_Jobdir', 'Try_Userpass'])
  222. ]),
  223. ('buildbot.secrets', [
  224. ('buildbot.secrets.providers.file', ['SecretInAFile']),
  225. ('buildbot.secrets.providers.vault', ['HashiCorpVaultSecretProvider'])
  226. ]),
  227. ('buildbot.worker', [
  228. ('buildbot.worker.base', ['Worker']),
  229. ('buildbot.worker.ec2', ['EC2LatentWorker']),
  230. ('buildbot.worker.libvirt', ['LibVirtWorker']),
  231. ('buildbot.worker.openstack', ['OpenStackLatentWorker']),
  232. ('buildbot.worker.docker', ['DockerLatentWorker']),
  233. ('buildbot.worker.hyper', ['HyperLatentWorker']),
  234. ('buildbot.worker.local', ['LocalWorker']),
  235. ]),
  236. ('buildbot.steps', [
  237. ('buildbot.process.buildstep', ['BuildStep']),
  238. ('buildbot.steps.cmake', ['CMake']),
  239. ('buildbot.steps.cppcheck', ['Cppcheck']),
  240. ('buildbot.steps.http', [
  241. 'HTTPStep', 'POST', 'GET', 'PUT', 'DELETE', 'HEAD',
  242. 'OPTIONS']),
  243. ('buildbot.steps.master', [
  244. 'MasterShellCommand', 'SetProperty', 'SetProperties', 'LogRenderable', "Assert"]),
  245. ('buildbot.steps.maxq', ['MaxQ']),
  246. ('buildbot.steps.mswin', ['Robocopy']),
  247. ('buildbot.steps.mtrlogobserver', ['MTR']),
  248. ('buildbot.steps.package.deb.lintian', ['DebLintian']),
  249. ('buildbot.steps.package.deb.pbuilder', [
  250. 'DebPbuilder', 'DebCowbuilder', 'UbuPbuilder',
  251. 'UbuCowbuilder']),
  252. ('buildbot.steps.package.rpm.mock', [
  253. 'Mock', 'MockBuildSRPM', 'MockRebuild']),
  254. ('buildbot.steps.package.rpm.rpmbuild', ['RpmBuild']),
  255. ('buildbot.steps.package.rpm.rpmlint', ['RpmLint']),
  256. ('buildbot.steps.package.rpm.rpmspec', ['RpmSpec']),
  257. ('buildbot.steps.python', [
  258. 'BuildEPYDoc', 'PyFlakes', 'PyLint', 'Sphinx']),
  259. ('buildbot.steps.python_twisted', [
  260. 'HLint', 'Trial', 'RemovePYCs']),
  261. ('buildbot.steps.shell', [
  262. 'ShellCommand', 'TreeSize', 'SetPropertyFromCommand',
  263. 'Configure', 'WarningCountingShellCommand', 'Compile',
  264. 'Test', 'PerlModuleTest']),
  265. ('buildbot.steps.shellsequence', ['ShellSequence']),
  266. ('buildbot.steps.source.bzr', ['Bzr']),
  267. ('buildbot.steps.source.cvs', ['CVS']),
  268. ('buildbot.steps.source.darcs', ['Darcs']),
  269. ('buildbot.steps.source.gerrit', ['Gerrit']),
  270. ('buildbot.steps.source.git', ['Git']),
  271. ('buildbot.steps.source.github', ['GitHub']),
  272. ('buildbot.steps.source.mercurial', ['Mercurial']),
  273. ('buildbot.steps.source.mtn', ['Monotone']),
  274. ('buildbot.steps.source.p4', ['P4']),
  275. ('buildbot.steps.source.repo', ['Repo']),
  276. ('buildbot.steps.source.svn', ['SVN']),
  277. ('buildbot.steps.subunit', ['SubunitShellCommand']),
  278. ('buildbot.steps.transfer', [
  279. 'FileUpload', 'DirectoryUpload', 'MultipleFileUpload',
  280. 'FileDownload', 'StringDownload', 'JSONStringDownload',
  281. 'JSONPropertiesDownload']),
  282. ('buildbot.steps.trigger', ['Trigger']),
  283. ('buildbot.steps.vstudio', [
  284. 'VC6', 'VC7', 'VS2003', 'VC8', 'VS2005', 'VCExpress9', 'VC9',
  285. 'VS2008', 'VC10', 'VS2010', 'VC11', 'VS2012', 'VC12', 'VS2013',
  286. 'VC14', 'VS2015', 'MsBuild4', 'MsBuild', 'MsBuild12', 'MsBuild14']),
  287. ('buildbot.steps.worker', [
  288. 'SetPropertiesFromEnv', 'FileExists', 'CopyDirectory',
  289. 'RemoveDirectory', 'MakeDirectory']),
  290. ]),
  291. ('buildbot.reporters', [
  292. ('buildbot.reporters.mail', ['MailNotifier']),
  293. ('buildbot.reporters.pushjet', ['PushjetNotifier']),
  294. ('buildbot.reporters.pushover', ['PushoverNotifier']),
  295. ('buildbot.reporters.message', ['MessageFormatter']),
  296. ('buildbot.reporters.gerrit', ['GerritStatusPush']),
  297. ('buildbot.reporters.gerrit_verify_status',
  298. ['GerritVerifyStatusPush']),
  299. ('buildbot.reporters.http', ['HttpStatusPush']),
  300. ('buildbot.reporters.github', ['GitHubStatusPush', 'GitHubCommentPush']),
  301. ('buildbot.reporters.gitlab', ['GitLabStatusPush']),
  302. ('buildbot.reporters.stash', ['StashStatusPush']),
  303. ('buildbot.reporters.bitbucketserver', ['BitbucketServerStatusPush', 'BitbucketServerPRCommentPush']),
  304. ('buildbot.reporters.bitbucket', ['BitbucketStatusPush']),
  305. ('buildbot.reporters.irc', ['IRC']),
  306. ]),
  307. ('buildbot.util', [
  308. # Connection seems to be a way too generic name, though
  309. ('buildbot.worker.libvirt', ['Connection']),
  310. ('buildbot.changes.filter', ['ChangeFilter']),
  311. ('buildbot.changes.gerritchangesource', ['GerritChangeFilter']),
  312. ('buildbot.changes.svnpoller', [
  313. ('svn.split_file_projects_branches',
  314. 'split_file_projects_branches'),
  315. ('svn.split_file_branches', 'split_file_branches'),
  316. ('svn.split_file_alwaystrunk', 'split_file_alwaystrunk')]),
  317. ('buildbot.configurators.janitor', ['JanitorConfigurator']),
  318. ('buildbot.config', ['BuilderConfig']),
  319. ('buildbot.locks', [
  320. 'MasterLock',
  321. 'WorkerLock',
  322. ]),
  323. ('buildbot.manhole', [
  324. 'AuthorizedKeysManhole', 'PasswordManhole', 'TelnetManhole']),
  325. ('buildbot.process.builder', [
  326. 'enforceChosenWorker',
  327. ]),
  328. ('buildbot.process.factory', [
  329. 'BuildFactory', 'GNUAutoconf', 'CPAN', 'Distutils', 'Trial',
  330. 'BasicBuildFactory', 'QuickBuildFactory', 'BasicSVN']),
  331. ('buildbot.process.logobserver', ['LogLineObserver']),
  332. ('buildbot.process.properties', [
  333. 'FlattenList', 'Interpolate', 'Property', 'Transform',
  334. 'WithProperties', 'renderer']),
  335. ('buildbot.process.properties', [
  336. 'CommandlineUserManager']),
  337. ('buildbot.revlinks', ['RevlinkMatch']),
  338. ('buildbot.reporters.utils', ['URLForBuild']),
  339. ('buildbot.schedulers.forcesched', [
  340. 'AnyPropertyParameter', 'BooleanParameter',
  341. 'ChoiceStringParameter',
  342. 'CodebaseParameter', 'FileParameter', 'FixedParameter', 'InheritBuildParameter',
  343. 'IntParameter', 'NestedParameter', 'ParameterGroup',
  344. 'PatchParameter',
  345. 'StringParameter', 'TextParameter', 'UserNameParameter',
  346. 'WorkerChoiceParameter',
  347. ]),
  348. ('buildbot.process.results', [
  349. 'Results', 'SUCCESS', 'WARNINGS', 'FAILURE', 'SKIPPED',
  350. 'EXCEPTION', 'RETRY', 'CANCELLED']),
  351. ('buildbot.steps.mtrlogobserver', ['EqConnectionPool']),
  352. ('buildbot.steps.source.repo', [
  353. ('repo.DownloadsFromChangeSource',
  354. 'RepoDownloadsFromChangeSource'),
  355. ('repo.DownloadsFromProperties',
  356. 'RepoDownloadsFromProperties')]),
  357. ('buildbot.steps.shellsequence', ['ShellArg']),
  358. ('buildbot.www.avatar', ['AvatarGravatar']),
  359. ('buildbot.www.auth', [
  360. 'UserPasswordAuth', 'HTPasswdAuth', 'RemoteUserAuth', 'CustomAuth']),
  361. ('buildbot.www.ldapuserinfo', ['LdapUserInfo']),
  362. ('buildbot.www.oauth2', [
  363. 'GoogleAuth', 'GitHubAuth', 'GitLabAuth', 'BitbucketAuth']),
  364. ('buildbot.db.dbconfig', [
  365. 'DbConfig']),
  366. ('buildbot.www.authz', [
  367. 'Authz', 'fnmatchStrMatcher', 'reStrMatcher']),
  368. ('buildbot.www.authz.roles', [
  369. 'RolesFromEmails', 'RolesFromGroups', 'RolesFromOwner', 'RolesFromUsername',
  370. 'RolesFromDomain']),
  371. ('buildbot.www.authz.endpointmatchers', [
  372. 'AnyEndpointMatcher', 'StopBuildEndpointMatcher', 'ForceBuildEndpointMatcher',
  373. 'RebuildBuildEndpointMatcher', 'AnyControlEndpointMatcher', 'EnableSchedulerEndpointMatcher']),
  374. ]),
  375. ('buildbot.webhooks', [
  376. ('buildbot.www.hooks.base', ['base']),
  377. ('buildbot.www.hooks.bitbucket', ['bitbucket']),
  378. ('buildbot.www.hooks.github', ['github']),
  379. ('buildbot.www.hooks.gitlab', ['gitlab']),
  380. ('buildbot.www.hooks.gitorious', ['gitorious']),
  381. ('buildbot.www.hooks.poller', ['poller']),
  382. ('buildbot.www.hooks.bitbucketserver', ['bitbucketserver'])
  383. ])
  384. ]), {
  385. 'console_scripts': [
  386. 'buildbot=buildbot.scripts.runner:run',
  387. # this will also be shipped on non windows :-(
  388. 'buildbot_windows_service=buildbot.scripts.windows_service:HandleCommandLine',
  389. ]}
  390. )
  391. }
  392. # set zip_safe to false to force Windows installs to always unpack eggs
  393. # into directories, which seems to work better --
  394. # see http://buildbot.net/trac/ticket/907
  395. if sys.platform == "win32":
  396. setup_args['zip_safe'] = False
  397. py_27 = sys.version_info[0] > 2 or (
  398. sys.version_info[0] == 2 and sys.version_info[1] >= 7)
  399. if not py_27:
  400. raise RuntimeError("Buildbot master requires at least Python-2.7")
  401. # pip<1.4 doesn't have the --pre flag, and will thus attempt to install alpha
  402. # and beta versions of Buildbot. Prevent that from happening.
  403. VERSION_MSG = """
  404. This is a pre-release version of Buildbot, which can only be installed with
  405. pip-1.4 or later Try installing the latest stable version of Buildbot instead:
  406. pip install buildbot==0.8.12
  407. See https://pypi.python.org/pypi/buildbot to verify the current stable version.
  408. """
  409. if 'a' in version or 'b' in version:
  410. try:
  411. pip_dist = pkg_resources.get_distribution('pip')
  412. except pkg_resources.DistributionNotFound:
  413. pip_dist = None
  414. if pip_dist:
  415. if LooseVersion(pip_dist.version) < LooseVersion('1.4'):
  416. raise RuntimeError(VERSION_MSG)
  417. if sys.version_info[0] >= 3:
  418. twisted_ver = ">= 17.9.0"
  419. else:
  420. twisted_ver = ">= 16.1.0"
  421. autobahn_ver = ">= 0.16.0"
  422. txaio_ver = ">= 2.2.2"
  423. bundle_version = version.split("-")[0]
  424. # dependencies
  425. setup_args['install_requires'] = [
  426. 'setuptools >= 8.0',
  427. 'Twisted ' + twisted_ver,
  428. 'Jinja2 >= 2.1',
  429. # required for tests, but Twisted requires this anyway
  430. 'zope.interface >= 4.1.1',
  431. # python-future required for py2/3 compatibility
  432. 'future',
  433. 'sqlalchemy>=0.8.0',
  434. 'sqlalchemy-migrate>=0.9',
  435. 'python-dateutil>=1.5',
  436. 'txaio ' + txaio_ver,
  437. 'autobahn ' + autobahn_ver,
  438. 'PyJWT',
  439. ]
  440. # Unit test dependencies.
  441. test_deps = [
  442. # http client libraries
  443. 'treq',
  444. 'txrequests',
  445. # pyjade required for custom templates tests
  446. 'pyjade',
  447. # boto3 and moto required for running EC2 tests
  448. 'boto3',
  449. 'moto',
  450. # txgithub required to run buildbot.status.github module tests
  451. 'txgithub',
  452. 'ramlfications',
  453. 'mock>=2.0.0',
  454. ]
  455. if sys.platform != 'win32':
  456. test_deps += [
  457. # LZ4 fails to build on Windows:
  458. # https://github.com/steeve/python-lz4/issues/27
  459. # lz4 required for log compression tests.
  460. 'lz4',
  461. ]
  462. setup_args['tests_require'] = test_deps
  463. setup_args['extras_require'] = {
  464. 'test': [
  465. 'setuptools_trial',
  466. 'isort',
  467. # spellcheck introduced in version 1.4.0
  468. 'pylint<1.7.0',
  469. 'pyenchant',
  470. 'flake8~=2.6.0',
  471. ] + test_deps,
  472. 'bundle': [
  473. "buildbot-www=={0}".format(bundle_version),
  474. "buildbot-worker=={0}".format(bundle_version),
  475. "buildbot-waterfall-view=={0}".format(bundle_version),
  476. "buildbot-console-view=={0}".format(bundle_version),
  477. "buildbot-grid-view=={0}".format(bundle_version),
  478. ],
  479. 'tls': [
  480. 'Twisted[tls] ' + twisted_ver,
  481. # There are bugs with extras inside extras:
  482. # <https://github.com/pypa/pip/issues/3516>
  483. # so we explicitly include Twisted[tls] dependencies.
  484. 'pyopenssl >= 16.0.0',
  485. 'service_identity',
  486. 'idna >= 0.6',
  487. ],
  488. 'docs': [
  489. 'docutils<0.13.0',
  490. 'sphinx>1.4.0',
  491. 'sphinxcontrib-blockdiag',
  492. 'sphinxcontrib-spelling',
  493. 'pyenchant',
  494. 'docutils>=0.8',
  495. 'ramlfications',
  496. 'sphinx-jinja',
  497. 'towncrier'
  498. ],
  499. }
  500. if '--help-commands' in sys.argv or 'trial' in sys.argv or 'test' in sys.argv:
  501. setup_args['setup_requires'] = [
  502. 'setuptools_trial',
  503. ]
  504. if os.getenv('NO_INSTALL_REQS'):
  505. setup_args['install_requires'] = None
  506. setup_args['extras_require'] = None
  507. if __name__ == '__main__':
  508. setup(**setup_args)
  509. # Local Variables:
  510. # fill-column: 71
  511. # End: