]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Replace setup.py with setup.cfg and pyproject.toml
authorZack Cerza <zack@redhat.com>
Thu, 17 Mar 2022 23:34:59 +0000 (17:34 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 19 Apr 2022 21:31:07 +0000 (15:31 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
bootstrap
pyproject.toml [new file with mode: 0644]
requirements.in [deleted file]
requirements.txt
setup.cfg [new file with mode: 0644]
setup.py [deleted file]
update-requirements.sh

index 3d7f4a6250edddbacfd1735f943f428dd2044e5f..c1dd37c51eb46d2dba34889ff7f67eb2db34fb82 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -163,20 +163,14 @@ if [ -z "$NO_CLOBBER" ] || [ ! -e ./$VENV ]; then
     virtualenv --python=$PYTHON $VENV
 fi
 
-# Upgrade pip first - then we have a new pip version with the --use-feature flag
+# First, upgrade pip
 ./$VENV/bin/pip install --upgrade pip
 
-# Ensure setuptools is installed
-./$VENV/bin/pip install --use-feature=2020-resolver setuptools --upgrade
+# Remove leftover .pyc files
+find teuthology -name '*.pyc' -exec rm {} \;
 
-# Install all requirements
-./$VENV/bin/pip install --use-feature=2020-resolver --upgrade -r requirements.txt
+# Install teuthology in editable mode
+./$VENV/bin/pip install --editable .
 
 # Check to make sure requirements are met
 ./$VENV/bin/pip check
-
-# Remove leftover .pyc files
-find teuthology -name '*.pyc' -exec rm {} \;
-
-# Install teuthology
-./$VENV/bin/python setup.py develop
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644 (file)
index 0000000..b0f0765
--- /dev/null
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools>=42"]
+build-backend = "setuptools.build_meta"
diff --git a/requirements.in b/requirements.in
deleted file mode 100644 (file)
index dd5bce9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# install requires
-apache-libcloud
-gevent
-PyYAML
-argparse>=1.2.1
-configobj
-six>=1.9
-pexpect
-docopt
-netaddr
-paramiko
-pynacl >= 1.5.0  # for universal2 wheel
-psutil >= 2.1.0
-configparser
-ansible>=2.8,<2.10
-prettytable
-manhole
-humanfriendly
-# orchestra requires
-backports.ssl-match-hostname
-beanstalkc3>=0.4.0
-httplib2
-ndg-httpsclient
-pyasn1
-pyopenssl>=0.13
-python-dateutil
-python-novaclient
-python-openstackclient
-requests!=2.13.0
-sentry-sdk
-# test requires
-boto>=2.0b4
-boto3
-cryptography>=2.7
-nose
-pip-tools
-pytest
-mock
-requests
-tox
-xmltodict
-PyJWT
-ipy
-toml
index 8276a9ceb4e2fa6a9a841db5ccaf4b0eaac8c655..1b175b701e5dc17f7d690d661656ca3023567aaf 100644 (file)
@@ -2,32 +2,28 @@
 # This file is autogenerated by pip-compile with python 3.9
 # To update, run:
 #
-#    pip-compile requirements.in
+#    pip-compile pyproject.toml
 #
 ansible==2.9.27
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 apache-libcloud==3.3.1
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 appdirs==1.4.4
     # via openstacksdk
 argparse==1.4.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 attrs==21.2.0
-    # via
-    #   cmd2
-    #   pytest
-backports-entry-points-selectable==1.1.0
-    # via virtualenv
+    # via cmd2
 backports-ssl-match-hostname==3.7.0.1
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 bcrypt==3.2.0
     # via paramiko
 beanstalkc3==0.4.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 boto==2.49.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 boto3==1.21.20
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 botocore==1.24.20
     # via
     #   boto3
@@ -54,16 +50,16 @@ cmd2==2.1.2
 colorama==0.4.4
     # via cmd2
 configobj==5.0.6
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 configparser==5.0.2
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 cryptography==3.4.7
     # via
-    #   -r requirements.in
     #   ansible
     #   openstacksdk
     #   paramiko
     #   pyopenssl
+    #   teuthology (pyproject.toml)
 debtcollector==2.2.0
     # via
     #   oslo-config
@@ -73,30 +69,22 @@ decorator==5.0.9
     # via
     #   dogpile-cache
     #   openstacksdk
-distlib==0.3.2
-    # via virtualenv
 docopt==0.6.2
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 dogpile-cache==1.1.3
     # via openstacksdk
-filelock==3.0.12
-    # via
-    #   tox
-    #   virtualenv
 gevent==21.8.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 greenlet==1.1.0
     # via gevent
 httplib2==0.19.1
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 humanfriendly==9.2
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 idna==3.2
     # via requests
-iniconfig==1.1.1
-    # via pytest
 ipy==1.1
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 iso8601==0.1.16
     # via
     #   keystoneauth1
@@ -122,29 +110,23 @@ keystoneauth1==4.3.1
     #   python-cinderclient
     #   python-keystoneclient
     #   python-novaclient
-manhole==1.8.0
-    # via -r requirements.in
 markupsafe==2.0.1
     # via jinja2
-mock==4.0.3
-    # via -r requirements.in
 msgpack==1.0.2
     # via oslo-serialization
 munch==2.5.0
     # via openstacksdk
 ndg-httpsclient==0.5.1
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 netaddr==0.8.0
     # via
-    #   -r requirements.in
     #   oslo-config
     #   oslo-utils
+    #   teuthology (pyproject.toml)
 netifaces==0.11.0
     # via
     #   openstacksdk
     #   oslo-utils
-nose==1.3.7
-    # via -r requirements.in
 openstacksdk==0.58.0
     # via
     #   osc-lib
@@ -179,12 +161,9 @@ oslo-utils==4.9.2
     #   python-novaclient
     #   python-openstackclient
 packaging==21.0
-    # via
-    #   oslo-utils
-    #   pytest
-    #   tox
+    # via oslo-utils
 paramiko==2.10.1
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 pbr==5.6.0
     # via
     #   cliff
@@ -204,45 +183,33 @@ pbr==5.6.0
 pep517==0.11.0
     # via pip-tools
 pexpect==4.8.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 pip-tools==6.2.0
-    # via -r requirements.in
-platformdirs==2.2.0
-    # via virtualenv
-pluggy==0.13.1
-    # via
-    #   pytest
-    #   tox
+    # via teuthology (pyproject.toml)
 prettytable==2.1.0
     # via
-    #   -r requirements.in
     #   cliff
     #   python-cinderclient
     #   python-novaclient
+    #   teuthology (pyproject.toml)
 psutil==5.8.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 ptyprocess==0.7.0
     # via pexpect
-py==1.10.0
-    # via
-    #   pytest
-    #   tox
 pyasn1==0.4.8
     # via
-    #   -r requirements.in
     #   ndg-httpsclient
+    #   teuthology (pyproject.toml)
 pycparser==2.20
     # via cffi
-pyjwt==2.1.0
-    # via -r requirements.in
 pynacl==1.5.0
     # via
-    #   -r requirements.in
     #   paramiko
+    #   teuthology (pyproject.toml)
 pyopenssl==20.0.1
     # via
-    #   -r requirements.in
     #   ndg-httpsclient
+    #   teuthology (pyproject.toml)
 pyparsing==2.4.7
     # via
     #   cliff
@@ -251,41 +218,39 @@ pyparsing==2.4.7
     #   packaging
 pyperclip==1.8.2
     # via cmd2
-pytest==6.2.5
-    # via -r requirements.in
 python-cinderclient==8.0.0
     # via python-openstackclient
 python-dateutil==2.8.2
     # via
-    #   -r requirements.in
     #   botocore
+    #   teuthology (pyproject.toml)
 python-keystoneclient==4.2.0
     # via python-openstackclient
 python-novaclient==17.5.0
     # via
-    #   -r requirements.in
     #   python-openstackclient
+    #   teuthology (pyproject.toml)
 python-openstackclient==5.5.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 pytz==2021.1
     # via
     #   oslo-serialization
     #   oslo-utils
 pyyaml==5.4.1
     # via
-    #   -r requirements.in
     #   ansible
     #   cliff
     #   openstacksdk
     #   oslo-config
+    #   teuthology (pyproject.toml)
 requests==2.27.1
     # via
-    #   -r requirements.in
     #   apache-libcloud
     #   keystoneauth1
     #   oslo-config
     #   python-cinderclient
     #   python-keystoneclient
+    #   teuthology (pyproject.toml)
 requestsexceptions==1.4.0
     # via openstacksdk
 rfc3986==1.5.0
@@ -293,26 +258,23 @@ rfc3986==1.5.0
 s3transfer==0.5.2
     # via boto3
 sentry-sdk==1.3.1
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 simplejson==3.17.3
     # via
     #   osc-lib
     #   python-cinderclient
 six==1.16.0
     # via
-    #   -r requirements.in
     #   bcrypt
     #   configobj
     #   debtcollector
     #   keystoneauth1
     #   munch
     #   oslo-i18n
-    #   paramiko
     #   pyopenssl
     #   python-dateutil
     #   python-keystoneclient
-    #   tox
-    #   virtualenv
+    #   teuthology (pyproject.toml)
 stevedore==3.3.0
     # via
     #   cliff
@@ -325,21 +287,14 @@ stevedore==3.3.0
     #   python-novaclient
     #   python-openstackclient
 toml==0.10.2
-    # via
-    #   -r requirements.in
-    #   pytest
-    #   tox
+    # via teuthology (pyproject.toml)
 tomli==1.2.1
     # via pep517
-tox==3.24.1
-    # via -r requirements.in
 urllib3==1.26.6
     # via
     #   botocore
     #   requests
     #   sentry-sdk
-virtualenv==20.7.0
-    # via tox
 wcwidth==0.2.5
     # via
     #   cmd2
@@ -349,7 +304,7 @@ wheel==0.36.2
 wrapt==1.12.1
     # via debtcollector
 xmltodict==0.12.0
-    # via -r requirements.in
+    # via teuthology (pyproject.toml)
 zope-event==4.5.0
     # via gevent
 zope-interface==5.4.0
diff --git a/setup.cfg b/setup.cfg
new file mode 100644 (file)
index 0000000..0de92b8
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,134 @@
+[metadata]
+name = teuthology
+version = attr: teuthology.__version__
+long_description = file: README.rst
+long_description_content_type = text/x-rst
+url = https://github.com/ceph/teuthology
+author = Red Hat, Inc.
+license = MIT
+license_file = LICENSE
+classifiers =
+    Intended Audience :: Developers
+    License :: OSI Approved :: MIT License
+    Natural Language :: English
+    Operating System :: POSIX :: Linux
+    Programming Language :: Python :: 3
+    Programming Language :: Python :: 3 :: Only
+    Programming Language :: Python :: 3.6
+    Programming Language :: Python :: 3.7
+    Programming Language :: Python :: 3.8
+    Programming Language :: Python :: 3.9
+    Programming Language :: Python :: 3.10
+    Programming Language :: Python :: Implementation :: CPython
+    Topic :: Software Development :: Quality Assurance
+    Topic :: Software Development :: Testing
+    Topic :: System :: Distributed Computing
+    Topic :: System :: Filesystems
+description_content_type = text/x-rst; charset=UTF-8
+description_file = README.rst
+keywords = teuthology, test, ceph, cluster
+summary = Ceph test framework
+
+[options]
+packages = find:
+install_requires =
+    PyYAML
+    ansible>=2.8,<2.10
+    apache-libcloud
+    argparse>=1.2.1
+    backports.ssl-match-hostname
+    beanstalkc3>=0.4.0
+    boto>=2.0b4
+    boto3
+    configobj
+    configparser
+    cryptography>=2.7
+    docopt
+    gevent
+    httplib2
+    humanfriendly
+    ipy
+    ndg-httpsclient
+    netaddr
+    paramiko
+    pexpect
+    pip-tools
+    prettytable
+    psutil>=2.1.0
+    pyasn1
+    pynacl>=1.5.0
+    pyopenssl>=0.13
+    python-dateutil
+    python-novaclient
+    python-openstackclient
+    requests>2.13.0
+    sentry-sdk
+    six>=1.9
+    toml
+    xmltodict
+python_requires = >=3.6
+
+[options.entry_points]
+console_scripts =
+    teuthology = scripts.run:main
+    teuthology-openstack = scripts.openstack:main
+    teuthology-nuke = scripts.nuke:main
+    teuthology-suite = scripts.suite:main
+    teuthology-ls = scripts.ls:main
+    teuthology-worker = scripts.worker:main
+    teuthology-lock = scripts.lock:main
+    teuthology-schedule = scripts.schedule:main
+    teuthology-updatekeys = scripts.updatekeys:main
+    teuthology-update-inventory = scripts.update_inventory:main
+    teuthology-results = scripts.results:main
+    teuthology-report = scripts.report:main
+    teuthology-kill = scripts.kill:main
+    teuthology-queue = scripts.queue:main
+    teuthology-prune-logs = scripts.prune_logs:main
+    teuthology-describe = scripts.describe:main
+    teuthology-reimage = scripts.reimage:main
+    teuthology-dispatcher = scripts.dispatcher:main
+    teuthology-wait = scripts.wait:main
+
+[options.extras_require]
+manhole =
+    manhole
+rocketchat =
+    rocket-python>=1.2.15
+sentry =
+    sentry-sdk
+test =
+    PyJWT
+    boto>=2.0b4
+    boto3
+    cryptography>=2.7
+    ipy
+    mock
+    pip-tools
+    pytest
+    toml
+    tox
+    xmltodict
+
+[options.package_data]
+teuthology.openstack =
+    archive-key
+    archive-key.pub
+    openstack-centos-6.5-user-data.txt
+    openstack-centos-7.0-user-data.txt
+    openstack-centos-7.1-user-data.txt
+    openstack-centos-7.2-user-data.txt
+    openstack-debian-8.0-user-data.txt
+    openstack-opensuse-42.1-user-data.txt
+    openstack-teuthology.cron
+    openstack-teuthology.init
+    openstack-ubuntu-12.04-user-data.txt
+    openstack-ubuntu-14.04-user-data.txt
+    openstack-user-data.txt
+    openstack.yaml
+    setup-openstack.sh
+teuthology.task.install =
+    adjust-ulimits
+    daemon-helper
+teuthology.task.internal =
+    edit_sudoers.sh
diff --git a/setup.py b/setup.py
deleted file mode 100644 (file)
index 87c573a..0000000
--- a/setup.py
+++ /dev/null
@@ -1,138 +0,0 @@
-from setuptools import setup, find_packages
-import re
-
-module_file = open("teuthology/__init__.py").read()
-metadata = dict(re.findall(r"__([a-z]+)__\s*=\s*['\"]([^'\"]*)['\"]", module_file))
-long_description = open('README.rst').read()
-
-setup(
-    name='teuthology',
-    version=metadata['version'],
-    packages=find_packages(),
-    package_data={
-     'teuthology.task': ['adjust-ulimits', 'edit_sudoers.sh', 'daemon-helper'],
-     'teuthology.task': ['adjust-ulimits', 'edit_sudoers.sh', 'daemon-helper'],
-     'teuthology.openstack': [
-         'archive-key',
-         'archive-key.pub',
-         'openstack-centos-6.5-user-data.txt',
-         'openstack-centos-7.0-user-data.txt',
-         'openstack-centos-7.1-user-data.txt',
-         'openstack-centos-7.2-user-data.txt',
-         'openstack-debian-8.0-user-data.txt',
-         'openstack-opensuse-42.1-user-data.txt',
-         'openstack-teuthology.cron',
-         'openstack-teuthology.init',
-         'openstack-ubuntu-12.04-user-data.txt',
-         'openstack-ubuntu-14.04-user-data.txt',
-         'openstack-user-data.txt',
-         'openstack.yaml',
-         'setup-openstack.sh'
-     ],
-    },
-    author='Inktank Storage, Inc.',
-    author_email='ceph-qa@ceph.com',
-    description='Ceph test framework',
-    license='MIT',
-    keywords='teuthology test ceph cluster',
-    url='https://github.com/ceph/teuthology',
-    long_description=long_description,
-    classifiers=[
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: MIT License',
-        'Natural Language :: English',
-        'Operating System :: POSIX :: Linux',
-        'Programming Language :: Python :: 3.6',
-        'Topic :: Software Development :: Quality Assurance',
-        'Topic :: Software Development :: Testing',
-        'Topic :: System :: Distributed Computing',
-        'Topic :: System :: Filesystems',
-    ],
-    install_requires=['apache-libcloud',
-                      'gevent',
-                      'PyYAML',
-                      'argparse >= 1.2.1',
-                      'configobj',
-                      'six >= 1.9', # python-openstackclient won't work properly with less
-                      'pexpect',
-                      'docopt',
-                      'netaddr',  # teuthology/misc.py
-                      # only used by orchestra, but we monkey-patch it in
-                      # teuthology/__init__.py
-                      'paramiko',
-                      'psutil >= 2.1.0',
-                      'configparser',
-                      'ansible>=2.0',
-                      'prettytable',
-                      'rocket-python >= 1.2.15',
-                      'manhole',
-                      'humanfriendly',
-                      ],
-    extras_require = {
-        'orchestra': [
-            # For apache-libcloud when using python < 2.7.9
-            'backports.ssl_match_hostname',
-            'beanstalkc3 >= 0.4.0',
-            'httplib2',
-            'ndg-httpsclient',  # for requests, urllib3
-            'pyasn1',           # for requests, urllib3
-            'pyopenssl>=0.13',  # for requests, urllib3
-            'python-dateutil',
-            # python-novaclient is specified here, even though it is
-            # redundant, because python-openstackclient requires
-            # Babel, and installs 2.3.3, which is forbidden by
-            # python-novaclient 4.0.0
-            'python-novaclient',
-            'python-openstackclient',
-            # with openstacklient >= 2.1.0, neutronclient no longer is
-            # a dependency but we need it anyway.
-            'python-neutronclient',
-            'requests != 2.13.0',
-            'sentry-sdk',
-        ],
-        'test': [
-            'boto >= 2.0b4',       # for qa/tasks/radosgw_*.py
-            'cryptography >= 2.7',  # for qa/tasks/mgr/dashboard/test_rgw.py
-            'nose', # for qa/tasks/rgw_multisite_tests.py',
-            'pip-tools',
-            'pytest',           # for tox.ini
-            'requests',         # for qa/tasks/mgr/dashboard/helper.py
-            'tox',
-            # For bucket notification testing in multisite
-            'xmltodict',
-            'boto3',
-            'PyJWT',            # for qa/tasks/mgr/dashboard/test_auth.py
-            'ipy',              # for qa/tasks/cephfs/mount.py
-            'toml',             # for qa/tasks/cephadm.py
-        ]
-    },
-
-
-    # to find the code associated with entry point
-    # A.B:foo first cd into directory A, open file B
-    # and find sub foo
-    entry_points={
-        'console_scripts': [
-            'teuthology = scripts.run:main',
-            'teuthology-openstack = scripts.openstack:main',
-            'teuthology-nuke = scripts.nuke:main',
-            'teuthology-suite = scripts.suite:main',
-            'teuthology-ls = scripts.ls:main',
-            'teuthology-worker = scripts.worker:main',
-            'teuthology-lock = scripts.lock:main',
-            'teuthology-schedule = scripts.schedule:main',
-            'teuthology-updatekeys = scripts.updatekeys:main',
-            'teuthology-update-inventory = scripts.update_inventory:main',
-            'teuthology-results = scripts.results:main',
-            'teuthology-report = scripts.report:main',
-            'teuthology-kill = scripts.kill:main',
-            'teuthology-queue = scripts.queue:main',
-            'teuthology-prune-logs = scripts.prune_logs:main',
-            'teuthology-describe = scripts.describe:main',
-            'teuthology-reimage = scripts.reimage:main',
-            'teuthology-dispatcher = scripts.dispatcher:main',
-            'teuthology-wait = scripts.wait:main',
-            ],
-        },
-
-    )
index 1334538441eb86162ffa87fc3cc01ab2dfae4d10..8040c0d1e3a3219e9b9f893b38045f7c48ea5d58 100755 (executable)
@@ -1,4 +1,3 @@
 #!/bin/bash
 
-pip-compile $@ requirements.in
-sed -i'' -e '/^-e / d' -e 's/-r requirements.in/teuthology/g' requirements.txt
\ No newline at end of file
+pip-compile $@ pyproject.toml