Skip to content

Commit

Permalink
Use modern pyproject.toml package metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-fg committed May 5, 2023
1 parent 455e739 commit 6b9113e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 44 deletions.
1 change: 0 additions & 1 deletion README

This file was deleted.

8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,18 @@ pip will default to installing into currently-active venv, then user's home
directory (under ``~/.local/lib/python...``), and maybe system-wide when running
as root (only useful in specialized environments like docker containers).

More info on python packaging can be found at `packaging.python.org`_.
There are many other python packaging tools - pipenv_, poetry_, pdm_, etc -
use whatever is most suitable for specific project/environment.

More general info on python packaging can be found at `packaging.python.org`_.

When changing code, unit tests can be run with ``python -m unittest discover``
from the local repository checkout.

.. _unidecode: https://pypi.python.org/pypi/Unidecode
.. _pip: https://pip.pypa.io/en/stable/
.. _venv: https://docs.python.org/3/library/venv.html
.. _poetry: https://python-poetry.org/
.. _pipenv: https://pipenv.pypa.io/
.. _pdm: https://pdm.fming.dev/
.. _packaging.python.org: https://packaging.python.org/installing/
2 changes: 0 additions & 2 deletions pyaml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# import itertools as it, operator as op, functools as ft

import os, sys, io, re, string, warnings, pathlib, collections as cs

import yaml
Expand Down
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[project]

name = "pyaml"
version = "23.05.05"

description = "PyYAML-based module to produce a bit more pretty and readable YAML-serialized data"
authors = [{name="Mike Kazantsev", email="mk.fraggod@gmail.com"}]
license = {text="WTFPL"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: Public Domain",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities" ]
keywords = ["yaml", "serialization", "pretty", "print", "format", "human", "readability"]

dependencies = ["PyYAML"]
dynamic = ["readme"]

[tool.setuptools.dynamic]
readme = {file="README.rst"}

[project.optional-dependencies]
anchors = ["unidecode"]
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

41 changes: 3 additions & 38 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
#!/usr/bin/env python

from setuptools import setup, find_packages
import os, io

pkg_root = os.path.dirname(__file__)

# Error-handling here is to allow package to be built w/o README included
try: readme = io.open(os.path.join(pkg_root, 'README.rst'), encoding='utf-8').read()
except IOError: readme = ''

setup(

name = 'pyaml',
version = '21.10.2',
author = 'Mike Kazantsev',
author_email = 'mk.fraggod@gmail.com',
license = 'WTFPL',
keywords = 'yaml serialization pretty print format human readable readability',
url = 'https://github.com/mk-fg/pretty-yaml',

description = 'PyYAML-based module to'
' produce pretty and readable YAML-serialized data',
long_description = readme,

classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Python Modules' ],

install_requires = ['PyYAML'],
packages = find_packages(),
package_data = {'': ['README.txt']},
exclude_package_data = {'': ['README.*']} )
# For compatibility only - see pyproject.toml file instead
from setuptools import setup
setup()

0 comments on commit 6b9113e

Please sign in to comment.