diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b9236e9..b0eba6d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -7,6 +7,6 @@ message = Update version {current_version} -> {new_version} search = __version__ = '{current_version}' replace = __version__ = '{new_version}' -[bumpversion:file:setup.py] -search = __version__ = '{current_version}' -replace = __version__ = '{new_version}' +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 68bc171..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include requirements.txt -include requirements-dev.txt -include LICENSE diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d23765d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,59 @@ +[project] +name = "ibm-secrets-manager-sdk" +version = "2.1.17" +authors = [ + { name="IBM", email="secrets.automation" } +] +description = "IBM Cloud Secrets Manager Python SDK" +readme = "README.md" +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Libraries :: Application Frameworks", +] +keywords = ["ibm", "cloud", "secrets manager", "ibm cloud services"] +dependencies = [ + "requests>=2.32.4,<3.0.0", + "urllib3>=2.6.3,<3.0.0", + "python-dateutil>=2.5.3,<3.0.0", + "ibm-cloud-sdk-core>=3.24.4,<4.0.0", +] + +[project.urls] +Repository = "https://github.com/IBM/secrets-manager-python-sdk" +Documentation = "https://cloud.ibm.com/apidocs/secrets-manager" +Issues = "https://github.com/IBM/secrets-manager-python-sdk/issues" +Changelog = "https://github.com/IBM/secrets-manager-python-sdk/blob/main/CHANGELOG.md" + +[project.optional-dependencies] +dev = [ + "coverage>=7.3.2,<8.0.0", + "pylint>=3.0.0,<4.0.0", + "pytest>=8.4.0,<8.5.0", + "pytest-cov>=7.0.0,<7.1.0", + "pytest-rerunfailures>=3.1", + "responses>=0.23.3,<1.0.0", + "black>=26.3.1,<26.3.2", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatchling.build.targets.wheel] +packages = ["ibm_secrets_manager_sdk"] + +[tool.black] +line-length = 120 +skip-string-normalization = true \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 2289a4a..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,8 +0,0 @@ -# test dependencies -coverage>=7.3.2,<8.0.0 -pylint>=3.0.0,<4.0.0 -pytest>=8.4.0,<8.5.0 -pytest-cov>=7.0.0,<7.1.0 -pytest-rerunfailures>=3.1 -responses>=0.23.3,<1.0.0 -black>=26.3.1,<26.3.2 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 10cbe99..0000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -requests>=2.32.4,<3.0.0 -urllib3>=2.6.3,<3.0.0 -python_dateutil>=2.5.3,<3.0.0 -ibm_cloud_sdk_core>=3.24.4,<4.0.0 diff --git a/setup.py b/setup.py deleted file mode 100644 index 80da559..0000000 --- a/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# Copyright 2019, 2020 IBM All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from setuptools import setup - -import os -import sys -import pkg_resources - -__version__ = '2.1.17' -PACKAGE_NAME = 'ibm_secrets_manager_sdk' -PACKAGE_DESC = 'IBM Cloud Secrets Manager Python SDK' - -with open('requirements.txt') as f: - install_requires = [str(req) for req in pkg_resources.parse_requirements(f)] -with open('requirements-dev.txt') as f: - tests_require = [str(req) for req in pkg_resources.parse_requirements(f)] - -if sys.argv[-1] == 'publish': - # test server - os.system('python setup.py register -r pypitest') - os.system('python setup.py sdist upload -r pypitest') - - # production server - os.system('python setup.py register -r pypi') - os.system('python setup.py sdist upload -r pypi') - sys.exit() - -with open("README.md", "r") as fh: - readme = fh.read() - -setup(name=PACKAGE_NAME.replace('_', '-'), - version=__version__, - description=PACKAGE_DESC, - license='Apache 2.0', - install_requires=install_requires, - tests_require=tests_require, - author='IBM', - long_description=readme, - long_description_content_type='text/markdown', - url='https://github.com/IBM/secrets-manager-python-sdk', - packages=[PACKAGE_NAME], - include_package_data=True, - keywords=PACKAGE_NAME, - classifiers=[ - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: OS Independent', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Software Development :: Libraries :: Application Frameworks', - ], - zip_safe=True - )