← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:declarative-setup into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:declarative-setup into launchpad:master.

Commit message:
Move declarative parts of setup.py to setup.cfg

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/411326

Assisted by https://github.com/asottile/setup-py-upgrade.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:declarative-setup into launchpad:master.
diff --git a/setup.cfg b/setup.cfg
index 77c02df..70efbe9 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +1,189 @@
+[metadata]
+name = lp
+version = 2.2.3
+description = A unique collaboration and Bazaar code hosting platform for software projects.
+url = https://launchpad.net/
+maintainer = Launchpad Developers
+license = Affero GPL v3
+license_file = LICENSE
+classifiers =
+    Development Status :: 5 - Production/Stable
+    Intended Audience :: Developers
+    Programming Language :: Python
+
+[options]
+packages = find:
+# This list should only contain direct dependencies - things imported or
+# used in ZCML.
+install_requires =
+    ampoule
+    beautifulsoup4[lxml]
+    boto3
+    breezy
+    celery
+    cssutils
+    defusedxml
+    distro
+    dkimpy[ed25519]
+    feedparser
+    fixtures
+    # Required for gunicorn[gthread].  We depend on it explicitly because
+    # gunicorn declares its dependency in a way that produces (and thus may
+    # cache) different wheels depending on whether it was built on Python 2
+    # or 3 while claiming that the wheels are universal.
+    # XXX cjwatson 2020-02-03: Remove this once we're on Python 3.
+    futures; python_version < "3.2"
+    geoip2
+    gunicorn
+    importlib-resources; python_version < "3.7"
+    ipython
+    jsautobuild
+    launchpad-buildd
+    launchpadlib
+    lazr.batchnavigator
+    lazr.config
+    lazr.delegates
+    lazr.enum
+    lazr.jobrunner
+    lazr.lifecycle
+    lazr.restful
+    lazr.sshserver
+    lazr.uri
+    lpjsmin
+    lxml[cssselect]
+    Markdown
+    meliae
+    multipart
+    oauth
+    oauthlib
+    oops
+    oops_amqp
+    oops_datedir_repo
+    oops_timeline
+    oops_twisted
+    oops_wsgi
+    paramiko
+    psutil
+    pgbouncer
+    psycopg2
+    pyasn1
+    pygettextpo
+    pygpgme
+    pymacaroons
+    pystache
+    python-debian
+    python-keystoneclient
+    python-memcached
+    python-openid2
+    python-subunit
+    python-swiftclient
+    pytz
+    PyYAML
+    rabbitfixture
+    requests
+    requests-file
+    requests-toolbelt
+    responses
+    secure-cookie
+    setproctitle
+    setuptools
+    six
+    soupmatchers
+    Sphinx
+    statsd
+    storm
+    talisker[gunicorn]
+    tenacity
+    testscenarios
+    testtools
+    timeline
+    transaction
+    treq
+    Twisted[conch,tls]
+    txfixtures
+    txpkgupload
+    virtualenv-tools3
+    wadllib
+    WebOb
+    WebTest
+    Werkzeug
+    WSGIProxy2
+    z3c.ptcompat
+    zope.app.http
+    zope.app.publication
+    zope.app.publisher
+    zope.app.wsgi[testlayer]
+    zope.authentication
+    zope.browser
+    zope.browsermenu
+    zope.browserpage
+    zope.browserresource
+    zope.component[zcml]
+    zope.configuration
+    zope.contenttype
+    zope.datetime
+    zope.error
+    zope.event
+    zope.exceptions
+    zope.formlib
+    zope.i18n
+    zope.i18nmessageid
+    zope.interface
+    zope.lifecycleevent
+    zope.location
+    zope.login
+    zope.pagetemplate
+    zope.principalregistry
+    zope.processlifetime
+    zope.proxy
+    zope.publisher
+    zope.schema
+    zope.security
+    zope.securitypolicy
+    zope.sendmail
+    zope.session
+    zope.tal
+    zope.tales
+    zope.testbrowser
+    zope.testing
+    zope.testrunner[subunit]
+    zope.traversing
+    zope.vocabularyregistry
+    # Loggerhead dependencies. These should be removed once bug 383360 is
+    # fixed and we include it as a source dist.
+    bleach
+    Paste
+    PasteDeploy
+    SimpleTAL
+include_package_data = True
+package_dir = =lib
+zip_safe = False
+
+[options.packages.find]
+where = lib
+
+[options.entry_points]
+console_scripts =
+    bingtestservice = lp.services.sitesearch.bingtestservice:main
+    build-twisted-plugin-cache = lp.services.twistedsupport.plugincache:main
+    generate-key-pair = lp.services.crypto.scripts.generatekeypair:main
+    harness = lp.scripts.harness:python
+    iharness = lp.scripts.harness:ipython
+    ipy = IPython.frontend.terminal.ipapp:launch_new_instance
+    jsbuild = lp.scripts.utilities.js.jsbuild:main
+    kill-test-services = lp.scripts.utilities.killtestservices:main
+    killservice = lp.scripts.utilities.killservice:main
+    retest = lp.testing.utilities.retest:main
+    run = lp.scripts.runlaunchpad:start_launchpad
+    run-testapp = lp.scripts.runlaunchpad:start_testapp
+    sprite-util = lp.scripts.utilities.spriteutil:main
+    start_librarian = lp.scripts.runlaunchpad:start_librarian
+    test = lp.scripts.utilities.test:main
+    twistd = twisted.scripts.twistd:run
+    version-info = lp.scripts.utilities.versioninfo:main
+    watch_jsbuild = lp.scripts.utilities.js.watchjsbuild:main
+    with-xvfb = lp.scripts.utilities.withxvfb:main
+
 [flake8]
 # These Python 2 builtins are needed until such time as we finish moving to
 # Python 3.
diff --git a/setup.py b/setup.py
index 595f582..d458e34 100644
--- a/setup.py
+++ b/setup.py
@@ -10,10 +10,7 @@ from string import Template
 import sys
 from textwrap import dedent
 
-from setuptools import (
-    find_packages,
-    setup,
-    )
+from setuptools import setup
 from setuptools.command.develop import develop
 from setuptools.command.easy_install import ScriptWriter
 
@@ -126,196 +123,8 @@ class lp_develop(develop):
                 print(os.environ["LPCONFIG"], file=instance_name_file)
 
 
-__version__ = '2.2.3'
-
 setup(
-    name='lp',
-    version=__version__,
-    packages=find_packages('lib'),
-    package_dir={'': 'lib'},
-    include_package_data=True,
-    zip_safe=False,
-    maintainer='Launchpad Developers',
-    description=('A unique collaboration and Bazaar code hosting platform '
-                 'for software projects.'),
-    license='Affero GPL v3',
-    # this list should only contain direct dependencies--things imported or
-    # used in zcml.
-    install_requires=[
-        'ampoule',
-        'beautifulsoup4[lxml]',
-        'boto3',
-        'breezy',
-        'celery',
-        'cssutils',
-        'defusedxml',
-        'distro',
-        'dkimpy[ed25519]',
-        'feedparser',
-        'fixtures',
-        # Required for gunicorn[gthread].  We depend on it explicitly
-        # because gunicorn declares its dependency in a way that produces
-        # (and thus may cache) different wheels depending on whether it was
-        # built on Python 2 or 3 while claiming that the wheels are
-        # universal.
-        # XXX cjwatson 2020-02-03: Remove this once we're on Python 3.
-        'futures; python_version < "3.2"',
-        'geoip2',
-        'gunicorn',
-        'importlib-resources; python_version < "3.7"',
-        'ipython',
-        'jsautobuild',
-        'launchpad-buildd',
-        'launchpadlib',
-        'lazr.batchnavigator',
-        'lazr.config',
-        'lazr.delegates',
-        'lazr.enum',
-        'lazr.jobrunner',
-        'lazr.lifecycle',
-        'lazr.restful',
-        'lazr.sshserver',
-        'lazr.uri',
-        'lpjsmin',
-        'lxml[cssselect]',
-        'Markdown',
-        'meliae',
-        'multipart',
-        'oauth',
-        'oauthlib',
-        'oops',
-        'oops_amqp',
-        'oops_datedir_repo',
-        'oops_timeline',
-        'oops_twisted',
-        'oops_wsgi',
-        'paramiko',
-        'psutil',
-        'pgbouncer',
-        'psycopg2',
-        'pyasn1',
-        'pygettextpo',
-        'pygpgme',
-        'pymacaroons',
-        'pystache',
-        'python-debian',
-        'python-keystoneclient',
-        'python-memcached',
-        'python-openid2',
-        'python-subunit',
-        'python-swiftclient',
-        'pytz',
-        'PyYAML',
-        'rabbitfixture',
-        'requests',
-        'requests-file',
-        'requests-toolbelt',
-        'responses',
-        'secure-cookie',
-        'setproctitle',
-        'setuptools',
-        'six',
-        'soupmatchers',
-        'Sphinx',
-        'statsd',
-        'storm',
-        'talisker[gunicorn]',
-        'tenacity',
-        'testscenarios',
-        'testtools',
-        'timeline',
-        'transaction',
-        'treq',
-        'Twisted[conch,tls]',
-        'txfixtures',
-        'txpkgupload',
-        'virtualenv-tools3',
-        'wadllib',
-        'WebOb',
-        'WebTest',
-        'Werkzeug',
-        'WSGIProxy2',
-        'z3c.ptcompat',
-        'zope.app.http',
-        'zope.app.publication',
-        'zope.app.publisher',
-        'zope.app.wsgi[testlayer]',
-        'zope.authentication',
-        'zope.browser',
-        'zope.browsermenu',
-        'zope.browserpage',
-        'zope.browserresource',
-        'zope.component[zcml]',
-        'zope.configuration',
-        'zope.contenttype',
-        'zope.datetime',
-        'zope.error',
-        'zope.event',
-        'zope.exceptions',
-        'zope.formlib',
-        'zope.i18n',
-        'zope.i18nmessageid',
-        'zope.interface',
-        'zope.lifecycleevent',
-        'zope.location',
-        'zope.login',
-        'zope.pagetemplate',
-        'zope.principalregistry',
-        'zope.processlifetime',
-        'zope.proxy',
-        'zope.publisher',
-        'zope.schema',
-        'zope.security',
-        'zope.securitypolicy',
-        'zope.sendmail',
-        'zope.session',
-        'zope.tal',
-        'zope.tales',
-        'zope.testbrowser',
-        'zope.testing',
-        'zope.testrunner[subunit]',
-        'zope.traversing',
-        'zope.vocabularyregistry',
-        # Loggerhead dependencies. These should be removed once
-        # bug 383360 is fixed and we include it as a source dist.
-        'bleach',
-        'Paste',
-        'PasteDeploy',
-        'SimpleTAL',
-    ],
-    url='https://launchpad.net/',
-    classifiers=[
-        "Development Status :: 5 - Production/Stable",
-        "Intended Audience :: Developers",
-        "Programming Language :: Python",
-    ],
     cmdclass={
         'develop': lp_develop,
     },
-    entry_points=dict(
-        console_scripts=[  # `console_scripts` is a magic name to setuptools
-            'bingtestservice = '
-                'lp.services.sitesearch.bingtestservice:main',
-            'build-twisted-plugin-cache = '
-                'lp.services.twistedsupport.plugincache:main',
-            'generate-key-pair = '
-                'lp.services.crypto.scripts.generatekeypair:main',
-            'harness = lp.scripts.harness:python',
-            'iharness = lp.scripts.harness:ipython',
-            'ipy = IPython.frontend.terminal.ipapp:launch_new_instance',
-            'jsbuild = lp.scripts.utilities.js.jsbuild:main',
-            'kill-test-services = lp.scripts.utilities.killtestservices:main',
-            'killservice = lp.scripts.utilities.killservice:main',
-            'retest = lp.testing.utilities.retest:main',
-            'run = lp.scripts.runlaunchpad:start_launchpad',
-            'run-testapp = lp.scripts.runlaunchpad:start_testapp',
-            'sprite-util = lp.scripts.utilities.spriteutil:main',
-            'start_librarian = lp.scripts.runlaunchpad:start_librarian',
-            'test = lp.scripts.utilities.test:main',
-            'twistd = twisted.scripts.twistd:run',
-            'version-info = lp.scripts.utilities.versioninfo:main',
-            'watch_jsbuild = lp.scripts.utilities.js.watchjsbuild:main',
-            'with-xvfb = lp.scripts.utilities.withxvfb:main',
-        ]
-    ),
 )