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

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2022-12-28 22:29:18 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-01-28 13:24:33 +0300
commit4c57bd71c6665803be2c61445c90fa2295dd993a (patch)
treeb6524efb6a73544ed7ffb71eb737e35749a795fb
parente2e40a351f63bb0b6e24889a227ef83ed8df4ff5 (diff)
change: Port to pyproject.toml
-rw-r--r--README.md4
-rw-r--r--pyproject.toml73
-rw-r--r--setup.cfg61
-rwxr-xr-xsetup.py8
4 files changed, 71 insertions, 75 deletions
diff --git a/README.md b/README.md
index 6ec582416..f3fe21bd6 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
- [precis_i18n](https://pypi.org/project/precis-i18n/)
- [packaging](https://pypi.org/project/packaging/)
- [Pillow](https://pypi.org/project/Pillow/)
-- [setuptools](https://pypi.org/project/setuptools/)
+- [setuptools](https://pypi.org/project/setuptools/) (>=65.0.0)
- [Gtk3](https://gitlab.com/gnome/gtk) (>=3.24.30)
- [GLib](https://gitlab.com/gnome/glib) (>=2.60.0)
- [GtkSourceView](https://gitlab.gnome.org/GNOME/gtksourceview)
@@ -41,7 +41,7 @@
### Install Requirements
-- [setuptools](https://pypi.org/project/setuptools/)
+- [setuptools](https://pypi.org/project/setuptools/) (>=65.0.0)
- [gettext](https://savannah.gnu.org/projects/gettext/)
### Running Tests
diff --git a/pyproject.toml b/pyproject.toml
index ce449fe03..09daf3287 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,15 +1,82 @@
[build-system]
requires = [
- "setuptools >= 43.0.0",
+ "setuptools >= 65.0.0",
]
build-backend = "setuptools.build_meta"
+[project]
+name = "gajim"
+description = "A GTK XMPP Client"
+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"},
+]
+keywords = ["chat", "messaging", "im", "xmpp", "voip"]
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: X11 Applications :: GTK",
+ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 3.10",
+ "Topic :: Communications :: Chat",
+]
+dependencies = [
+ "css-parser",
+ "keyring",
+ "nbxmpp>=4.0.1,<5.0.0",
+ "packaging",
+ "pillow",
+ "precis-i18n>=1.0.0",
+ "cryptography>=3.4.8",
+ "pycairo>=1.16.0",
+ "PyGObject>=3.42.0",
+]
+dynamic = ["version"]
+
+[project.urls]
+homepage = "https://gajim.org"
+repository = "https://dev.gajim.org/gajim/gajim"
+
+[project.optional-dependencies]
+dev = [
+ "ruff",
+ "codespell[toml]",
+ "nbxmpp @ git+https://dev.gajim.org/gajim/python-nbxmpp.git",
+ "PyGObject-stubs @ git+https://github.com/pygobject/pygobject-stubs.git",
+ "python-gitlab",
+ "sentry-sdk",
+]
+
+[project.scripts]
+gajim-remote = "gajim.gajim_remote:main"
+
+[project.gui-scripts]
+gajim = "gajim.gajim:main"
+
+[tool.setuptools]
+include-package-data = true
+
+[tool.setuptools.packages.find]
+include = ["gajim*"]
+# Necessary so gajim.data is recogniced as namespace package and all files
+# under it are included as package-data
+namespaces = true
+
+[tool.setuptools.package-data]
+"gajim.data" = [
+ "icons/**/index.theme",
+]
+
+[tool.setuptools.dynamic]
+version = {attr = "gajim.__version__"}
[tool.codespell]
skip = "*__pycache__*,build,test,*.egg-info,.git,*.po,*.nsi,*.spec"
ignore-words-list = "claus,pres,ser,trough"
-
[tool.pyright]
pythonVersion = "3.10"
pythonPlatform = "All"
@@ -80,7 +147,6 @@ include = [
"gajim/plugins/*",
]
-
[tool.ruff]
line-length = 80
@@ -164,7 +230,6 @@ target-version = "py310"
"test/common/test_styling.py" = ["RUF001", "E501"]
"test/common/test_regex.py" = ["RUF001"]
-
[tool.ruff.mccabe]
max-complexity = 15
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 237ab386e..000000000
--- a/setup.cfg
+++ /dev/null
@@ -1,61 +0,0 @@
-[metadata]
-name = gajim
-version = attr: gajim.__version__
-description = A GTK XMPP client
-long_description = file: README.md
-long_description_content_type = text/markdown
-author = Philipp Hoerist, Yann Leboulanger
-author_email = gajim-devel@gajim.org
-url = https://gajim.org
-license = GPL v3
-keywords = chat,messaging,im,xmpp,voip
-classifiers =
- Development Status :: 5 - Production/Stable
- Environment :: X11 Applications :: GTK
- License :: OSI Approved :: GNU General Public License v3 (GPLv3)
- Operating System :: OS Independent
- Programming Language :: Python :: 3.10
- Topic :: Communications :: Chat
-
-[options]
-python_requires = >=3.10
-packages = find:
-test_suite = test
-install_requires =
- css-parser
- keyring
- nbxmpp>=4.0.1,<5.0.0
- packaging
- pillow
- precis-i18n>=1.0.0
- cryptography>=3.4.8
- pycairo>=1.16.0
- PyGObject>=3.42.0
-
-[options.extras_require]
-dev =
- codespell[toml]
- isort
- nbxmpp @ git+https://dev.gajim.org/gajim/python-nbxmpp.git
- pre-commit
- PyGObject-stubs @ git+https://github.com/pygobject/pygobject-stubs.git
- python-gitlab
- ruamel.yaml
- ruff
- sentry-sdk
-
-[options.package_data]
-gajim =
- data/gui/*.ui
- data/icons/hicolor/*/*/*.png
- data/icons/hicolor/*/*/*.svg
- data/other/*
- data/sounds/*.wav
- data/style/*.css
- data/plugins/*/*
- py.typed
-
-[options.packages.find]
-exclude =
- gajim.dev
- test*
diff --git a/setup.py b/setup.py
index 4340f7f05..0cb78c633 100755
--- a/setup.py
+++ b/setup.py
@@ -190,13 +190,5 @@ setup(
'build_py': Build,
'install': Install,
},
- entry_points={
- 'console_scripts': [
- 'gajim-remote = gajim.gajim_remote:main',
- ],
- 'gui_scripts': [
- 'gajim = gajim.gajim:main',
- ]
- },
data_files=data_files
)