Skip to content

Commit

Permalink
Move most of the metadata from setup.py to pyproject.toml (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor authored Jan 11, 2024
1 parent 07a5f11 commit c2ce88b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
env:
TEST: true
run: |
python setup.py build_ext --inplace
pip install -e .
- name: "Run tests for ${{ matrix.python-version }}"
run: |
Expand Down
51 changes: 41 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
[build-system]
requires = ["setuptools", "wheel", "Cython"]
[project]
name = "DAWG2"
version = "0.12.1"
requires-python = ">= 3.8"
description = "Fast and memory efficient DAWG (DAFSA) for Python"
readme = "README.md"
license = {file = "LICENSE"}

[tool.coverage.run]
plugins = [
"Cython.Coverage"
authors = [
{name = "Mikhail Korobov", email = "kmike84@gmail.com"}
]
source = [
"src",
"tests"
maintainers = [
{name = "insolor", email = "insolor@gmail.com"}
]
omit = [
"bench/*",

classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Text Processing :: Linguistic",
]

[project.urls]
Homepage = "https://github.com/pymorphy2-fork/DAWG/"
Changelog = "https://github.com/pymorphy2-fork/DAWG/blob/master/CHANGES.md"

[build-system]
requires = ["setuptools", "wheel", "Cython"]

[tool.coverage.run]
plugins = ["Cython.Coverage"]
source = ["src", "tests"]
omit = ["bench/*"]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
Expand Down
41 changes: 6 additions & 35 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python
import glob
import os

Expand All @@ -24,40 +24,11 @@
)
]

ext_modules = cythonize(
extensions,
annotate=False,
compiler_directives=compiler_directives,
)

long_description = open("README.md", encoding="utf-8").read() + "\n\n" + open("CHANGES.md", encoding="utf-8").read()

setup(
name="DAWG2",
version="0.12.1",
description="Fast and memory efficient DAWG (DAFSA) for Python",
long_description=long_description,
long_description_content_type='text/markdown',
author="Mikhail Korobov",
author_email="kmike84@gmail.com",
url="https://github.com/pymorphy2-fork/DAWG/",
ext_modules=ext_modules,
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Text Processing :: Linguistic",
],
ext_modules=cythonize(
extensions,
annotate=False,
compiler_directives=compiler_directives,
),
)

0 comments on commit c2ce88b

Please sign in to comment.