Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Migrate pynipap to setuptools #1419

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pynipap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildrpm:
builddeb:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
$(PYTHON) setup.py sdist --dist-dir=../
$(PYTHON) -m build --sdist --outdir ../
rename -f 's/$(PROJECT)-(\d.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
debuild -us -uc
Expand All @@ -40,7 +40,6 @@ upload:
$(PYTHON) setup.py sdist upload

clean:
$(PYTHON) setup.py clean
rm -rf .pybuild/ MANIFEST dist/ debian/files debian/python-pynipap* \
debian/python3-pynipap* debian/$(PROJECT).substvars debian/.debhelper \
debian/debhelper-build-stamp
Expand Down
1 change: 0 additions & 1 deletion pynipap/debian/compat

This file was deleted.

12 changes: 8 additions & 4 deletions pynipap/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ Source: pynipap
Maintainer: Lukas Garberg <lukas@spritelink.net>
Section: python
Priority: optional
Build-Depends: debhelper (>= 10), dh-python,
python3 (>= 3.6)
Build-Depends: debhelper-compat (= 13),
dh-python,
python3-all,
python3-setuptools,
pybuild-plugin-pyproject
X-Python3-Version: >= 3.6
Standards-Version: 4.4.0
Standards-Version: 4.6.1
Homepage: https://spritelink.github.io/NIPAP/

Package: python3-pynipap
Architecture: all
Depends: ${misc:Depends}, python3 (>= 3.6)
Depends: ${misc:Depends}, ${python3:Depends}
Breaks: ${python3:Breaks}
Description: Python 3 module for accessing NIPAP
This package contains a client library for NIPAP. It's function is similar to
Expand Down
39 changes: 39 additions & 0 deletions pynipap/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
name = "pynipap"
dynamic = ["version", "description"]
readme = "README.rst"
license = {text = "MIT"}
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3'
]
keywords = ["nipap"]

[project.optional-dependencies]
instrumentation = [
"opentelemetry-api==1.29.0",
"opentelemetry-exporter-otlp==1.29.0",
"opentelemetry-exporter-otlp-proto-common==1.29.0",
"opentelemetry-exporter-otlp-proto-grpc==1.29.0",
"opentelemetry-exporter-otlp-proto-http==1.29.0",
"opentelemetry-proto==1.29.0",
"opentelemetry-sdk==1.29.0",
"opentelemetry-semantic-conventions==0.50b0",
"opentelemetry-util-http==0.50b0"
]

[project.urls]
Homepage = "http://SpriteLink.github.io/NIPAP"

[tool.setuptools.dynamic]
version = {attr = "pynipap.__version__"}

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

24 changes: 2 additions & 22 deletions pynipap/setup.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
#!/usr/bin/env python3

from distutils.core import setup
import sys

import pynipap
from setuptools import setup

long_desc = open('README.rst').read()
short_desc = long_desc.split('\n')[0].split(' - ')[1].strip()

setup(
name = 'pynipap',
version = pynipap.__version__,
description = short_desc,
long_description = long_desc,
author = pynipap.__author__,
author_email = pynipap.__author_email__,
license = pynipap.__license__,
url = pynipap.__url__,
packages = ['pynipap'],
keywords = ['nipap'],
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3'
]
long_description = long_desc
garberg marked this conversation as resolved.
Show resolved Hide resolved
)
Loading