diff --git a/README b/README deleted file mode 120000 index 92cacd2..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -README.rst \ No newline at end of file diff --git a/README.rst b/README.rst index 249107f..23ab195 100644 --- a/README.rst +++ b/README.rst @@ -267,7 +267,10 @@ 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. @@ -275,4 +278,7 @@ 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/ diff --git a/pyaml/__init__.py b/pyaml/__init__.py index 2d28c1f..1395a0a 100644 --- a/pyaml/__init__.py +++ b/pyaml/__init__.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8cf5a14 --- /dev/null +++ b/pyproject.toml @@ -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"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3c6e79c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/setup.py b/setup.py index d6dfaa5..989a315 100644 --- a/setup.py +++ b/setup.py @@ -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()