Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced setup.py with setup.cfg + pyproject.toml #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
@@ -0,0 +1,5 @@
[build-system]
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not that familiar with pyproject.toml yet, but what is that setuptools_scm[toml]>=3.4.3 for? It's not listed at https://packaging.python.org/tutorials/packaging-projects/#creating-pyproject-toml

Copy link
Author

@KOLANICH KOLANICH Dec 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is needed to fetch version from git tags. The version restriction and toml extra is because we configure it via pyproject.toml (every tool has to read pyproject.toml itself).

build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
21 changes: 21 additions & 0 deletions setup.cfg
@@ -1,3 +1,24 @@
[metadata]
name = dahuffman
author = Stefaan Lippens
author_email = soxofaan@gmail.com
license = MIT
description = Pure Python Huffman encoder and decoder module
keywords = huffman, compression, encoding, decoding
url = https://github.com/soxofaan/dahuffman
long_description = file: README.rst
long_description_content_type = text/x-rst
classifiers =
Intended Audience :: Developers
Topic :: System :: Archiving :: Compression
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3

[options]
packages = dahuffman, dahuffman.codecs
include_package_data = True


[bdist_wheel]
universal=1

Expand Down
30 changes: 2 additions & 28 deletions setup.py
@@ -1,32 +1,6 @@
from codecs import open
from os import path

from setuptools import setup

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

setup(
name='dahuffman',
version='0.4.2-alpha',
description='Pure Python Huffman encoder and decoder module',
long_description=long_description,
url='https://github.com/soxofaan/dahuffman',
author='Stefaan Lippens',
author_email='soxofaan@gmail.com',
license='MIT',
packages=['dahuffman', 'dahuffman.codecs'],
include_package_data=True,

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Intended Audience :: Developers',
'Topic :: System :: Archiving :: Compression',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
],
keywords='huffman compression encoding decoding',
if __name__ == "__main__":
setup()

)