Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2023-01-08 22:40:50 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-01-18 23:57:24 +0300
commit510072da587e0e374296267bde38d63e28ed18d4 (patch)
treebb413719b7f31ea65d226936b2f3ecec3e2453cf
parent3e4fee240f88cf7fed7648ea8cd9181daf919359 (diff)
change: Port package to pyproject.toml
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--debian/control14
-rw-r--r--pyproject.toml41
-rwxr-xr-xscripts/bump_version.py5
-rw-r--r--setup.cfg32
-rwxr-xr-xsetup.py5
6 files changed, 45 insertions, 55 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5a735e3..426066e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,7 +24,8 @@ build-linux:
stage: build
dependencies: []
script:
- - python3 setup.py sdist bdist_wheel
+ - pip install build
+ - python3 -m build
- python3 .ci/debian_build.py "$(find dist/nbxmpp-*.tar.gz)" 1 --pkgprefix=python3-
artifacts:
diff --git a/debian/control b/debian/control
index b0858ed..597478d 100644
--- a/debian/control
+++ b/debian/control
@@ -1,18 +1,17 @@
Source: python3-nbxmpp-nightly
-Section: net
+Section: python
Priority: optional
Maintainer: Gajim Maintainers <ci@gajim.org>
Build-Depends:
debhelper-compat (= 13),
dh-python,
- libglib2.0-0 (>= 2.60),
gir1.2-soup-3.0,
python3-all,
python3-gi,
python3-idna,
python3-packaging,
python3-precis-i18n,
- python3-setuptools,
+ python3-setuptools (>= 65.0.0),
Standards-Version: 4.1.4
Rules-Requires-Root: no
Homepage: https://dev.gajim.org/gajim/python-nbxmpp
@@ -23,14 +22,11 @@ Package: python3-nbxmpp-nightly
Architecture: all
Depends: ${misc:Depends},
${python3:Depends},
- libglib2.0-0 (>= 2.60),
gir1.2-soup-3.0,
python3-gi,
- python3-idna,
- python3-packaging,
- python3-precis-i18n,
Recommends: python3-gssapi,
-Breaks: gajim (<< 1.4~)
+Breaks: gajim (<< 1.6~)
+Conflicts: python3-nbxmpp
Description: Non blocking XMPP Python library
python-nbxmpp is a Python library that provides a way for Python applications
- to use the XMPP network. This library was initially a fork of xmpppy. \ No newline at end of file
+ to use the XMPP network. This library was initially a fork of xmpppy.
diff --git a/pyproject.toml b/pyproject.toml
index ecb2883..3b8f92c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,9 +1,44 @@
[build-system]
-requires = [
- "setuptools >= 43.0.0",
-]
+requires = ["setuptools >= 65.0.0"]
build-backend = "setuptools.build_meta"
+[project]
+name = "nbxmpp"
+description = "XMPP Library"
+keywords = ["chat", "messaging", "im", "xmpp"]
+readme = "README.md"
+requires-python = ">=3.10"
+license = {text = "GPL-3.0-or-later"}
+authors = [
+ {name = "Philipp Hörist", email = "philipp@hoerist.com"},
+ {name = "Yann Leboulanger", email = "yann@leboulanger.org"},
+]
+classifiers = [
+ "Programming Language :: Python :: 3.10",
+]
+dependencies = [
+ "precis-i18n>=1.0.0",
+ "packaging",
+ "idna",
+ "PyGObject",
+]
+
+dynamic = ["version"]
+
+[project.optional-dependencies]
+gssapi = ["gssapi"]
+
+[project.urls]
+repository = "https://dev.gajim.org/gajim/python-nbxmpp"
+
+[tool.setuptools.packages.find]
+include = ["nbxmpp*"]
+
+[tool.setuptools.package-data]
+"nbxmpp" = ["py.typed"]
+
+[tool.setuptools.dynamic]
+version = {attr = "nbxmpp.__version__"}
[tool.pyright]
pythonVersion = "3.10"
diff --git a/scripts/bump_version.py b/scripts/bump_version.py
index 54192ce..6c2a442 100755
--- a/scripts/bump_version.py
+++ b/scripts/bump_version.py
@@ -9,7 +9,6 @@ REPO_DIR = Path(__file__).resolve().parent.parent
INIT = REPO_DIR / 'nbxmpp' / '__init__.py'
-CFG = REPO_DIR / 'setup.cfg'
CHANGELOG = REPO_DIR / 'ChangeLog'
VERSION_RX = r'\d+\.\d+\.\d+'
@@ -28,10 +27,6 @@ def bump_version(current_version: str, new_version: str) -> None:
content = content.replace(current_version, new_version, 1)
INIT.write_text(content, encoding='utf8')
- content = CFG.read_text(encoding='utf8')
- content = content.replace(current_version, new_version, 1)
- CFG.write_text(content, encoding='utf8')
-
def make_changelog(new_version: str) -> None:
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index eb75efb..0000000
--- a/setup.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-[metadata]
-name = nbxmpp
-version = 4.0.1
-description = XMPP Library
-author = Yann Leboulanger, Philipp Hoerist
-author_email = gajim-devel@gajim.org
-long_description = file: README.md
-long_description_content_type = text/markdown
-keywords = xmpp chat
-url = https://dev.gajim.org/gajim/python-nbxmpp
-license_file = COPYING
-license = GPL v3
-classifiers =
- Programming Language :: Python :: 3.10
-
-[options]
-python_requires = >=3.10
-packages = find:
-install_requires =
- precis-i18n>=1.0.0
- packaging
- idna
-
-[options.extras_require]
-gssapi = gssapi
-
-[options.packages.find]
-exclude =
- test*
-
-[options.package_data]
-nbxmpp = py.typed
diff --git a/setup.py b/setup.py
deleted file mode 100755
index 229b2eb..0000000
--- a/setup.py
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env python3
-
-from setuptools import setup
-
-setup()