Skip to content

Commit

Permalink
Merge pull request #4 from dan-smalley/update-setup-to-pyproject
Browse files Browse the repository at this point in the history
Move from setup.py to pyproject.toml
  • Loading branch information
dan-smalley authored May 28, 2024
2 parents a54ed5f + cf1a8ad commit 432c842
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 56 deletions.
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["setuptools", "versioneer[toml]"]
build-backend = "setuptools.build_meta"

[project]
name = "zenAPIClient"
dynamic = ["version"]
authors = [
{name = "Dan Smalley", email="[email protected]"}
]
description = "Zenoss API client module"
readme = "README.md"
license = {file = "LICENSE.md"}
keywords = ["zenoss", "monitoring", "api"]
classifiers=[
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Monitoring",
]
dependencies = [
"python-dateutil>=2.6.1",
"requests>=2.18.1",
]
requires-python = ">=3.6"

[project.optional-dependencies]
test = [
"pytest>=3.2.3",
"pytest-responses>=0.4.0",
"versioneer",
]

[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "src/zenossapi/_version.py"
versionfile_build = "zenossapi/_version.py"
tag_prefix = "v"
parentdir_prefix = "zenAPIClient"

[tool.coverage.run]
omit = [
"_version.py",
]

[project.urls]
Homepage = "https://github.com/dan-smalley/zenAPIClient"
Documentation = "https://zenapiclient.readthedocs.io"
Repository = "https://github.com/dan-smalley/zenAPIClient.git"
64 changes: 8 additions & 56 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,58 +1,10 @@
import os
from setuptools import find_packages, setup
import sys
#!/usr/bin/env python

sys.path.insert(0, os.path.join(os.path.abspath(os.path.curdir), 'src'))
from zenossapi import __version__, __release__
import setuptools
import versioneer

name = 'ZenossAPIClient'

setup(name=name,
version=__release__,
description='Zenoss API client module',
long_description="""
Python module for interacting with the Zenoss API an an object-oriented way.
The philosophy here is to use objects to work with everything in the Zenoss
API, and to try to normalize the various calls to the different routers.
Thus `get` methods will always return an object, `list` methods will return
data. All methods to add or create start with `add`, all remove or delete
start with `delete`. As much as possible the methods try to hide the
idiosyncrasies of the JSON API, and to do the work for you, for example
by letting you use a device name instead of having to provide the full
device UID for every call.
""",
url='https://github.com/Zuora-TechOps/ZenossAPIClient',
author='Mark Troyer',
author_email='[email protected]',
license='Apache',
classifiers=[
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Topic :: System :: Monitoring',
],
keywords='Zenoss monitoring api',
packages=find_packages(where='src'),
package_dir={'': 'src'},
zip_safe=False,
tests_require=[
'pytest>=3.2.3',
'pytest-responses>=0.3.0',
],
install_requires=[
'python-dateutil>=2.6.1',
'requests>=2.18.1',
],
command_options={
'build_sphinx': {
'project': ('setup.py', name),
'version': ('setup.py', __version__),
'release': ('setup.py', __release__),
'source_dir': ('setup.py', 'docs'),
'build_dir': ('setup.py', 'docs/_build'),
'config_dir': ('setup.py', 'docs'),
}
}
)
if __name__ == "__main__":
setuptools.setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
)

0 comments on commit 432c842

Please sign in to comment.