Merge lp:~exarkun/divmod.org/nevow-setup.py-simpler-code into lp:divmod.org

Proposed by Jean-Paul Calderone on 2014-06-07
Status: Merged
Approved by: Tristan Seligmann on 2014-06-07
Approved revision: 2744
Merged at revision: 2744
Proposed branch: lp:~exarkun/divmod.org/nevow-setup.py-simpler-code
Merge into: lp:divmod.org
Prerequisite: lp:~exarkun/divmod.org/nevow-setup.py-mandatory-setuptools
Diff against target: 69 lines (+18/-23)
1 file modified
Nevow/setup.py (+18/-23)
To merge this branch: bzr merge lp:~exarkun/divmod.org/nevow-setup.py-simpler-code
Reviewer Review Type Date Requested Status
Tristan Seligmann 2014-06-07 Approve on 2014-06-07
Review via email: mp+222430@code.launchpad.net

Commit message

Simplify the code invoking `setuptools.setup` in Nevow's setup.py now that it does not depend on any conditions.

To post a comment you must log in.
Jean-Paul Calderone (exarkun) wrote :

The intent is that no argument values have changed. Effectively all I've done is replaced `setup(**dict)` with `setup(keyword=arguments)`.

I verified that the resulting wheel and sdist produced are the same (modulo changes to the included setup.py that this branch makes).

Tristan Seligmann (mithrandi) wrote :

This also looks good, please merge.

Additionally, thanks for splitting these changes up; it made reviewing them substantially easier (although I fear at the cost of the actual changes being three times as much work).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nevow/setup.py'
2--- Nevow/setup.py 2014-06-07 12:34:48 +0000
3+++ Nevow/setup.py 2014-06-07 12:34:48 +0000
4@@ -3,6 +3,7 @@
5 from nevow import __version__ as version
6
7 from setuptools import setup, find_packages
8+from distutils.command.sdist import sdist
9
10 import os
11 data_files=[]
12@@ -16,16 +17,19 @@
13
14 data_files.append((os.path.join('twisted', 'plugins'), [os.path.join('twisted', 'plugins', 'nevow_widget.py')]))
15
16-setupdict = {
17- 'name': 'Nevow',
18- 'version': version,
19- 'maintainer': 'Divmod, Inc.',
20- 'maintainer_email': 'support@divmod.org',
21- 'description': 'Web Application Construction Kit',
22- 'url': 'http://divmod.org/trac/wiki/DivmodNevow',
23- 'license': 'MIT',
24- 'platforms': ["any"],
25- 'classifiers': [
26+setup(
27+ name='Nevow',
28+ version=version,
29+ packages=find_packages(),
30+ include_package_data=True,
31+ cmdclass={'sdist': sdist},
32+ maintainer='Divmod, Inc.',
33+ maintainer_email='support@divmod.org',
34+ description='Web Application Construction Kit',
35+ url='http://divmod.org/trac/wiki/DivmodNevow',
36+ license='MIT',
37+ platforms=["any"],
38+ classifiers=[
39 "Development Status :: 5 - Production/Stable",
40 "Framework :: Twisted",
41 "Intended Audience :: Developers",
42@@ -34,9 +38,9 @@
43 "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
44 "Topic :: Software Development :: Libraries",
45 ],
46- 'scripts': ['bin/nevow-xmlgettext', 'bin/nit'],
47- 'data_files': data_files,
48- 'package_data': {
49+ scripts=['bin/nevow-xmlgettext', 'bin/nit'],
50+ data_files=data_files,
51+ package_data={
52 'formless': [
53 'freeform-default.css'
54 ],
55@@ -78,13 +82,4 @@
56 '*.js'
57 ],
58 }
59-}
60-
61-setupdict['packages'] = find_packages()
62-setupdict['include_package_data'] = True
63-
64-from distutils.command.sdist import sdist
65-setupdict['cmdclass'] = {'sdist': sdist}
66-
67-setup(**setupdict)
68-
69+)

Subscribers

People subscribed via source and target branches