mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
Update setuptools and black (#498)
* Use setuptools * Use black==22.1.0
This commit is contained in:
parent
89ea57747e
commit
cb50b2081b
13 changed files with 83 additions and 84 deletions
6
.github/workflows/black.yaml
vendored
6
.github/workflows/black.yaml
vendored
|
@ -17,9 +17,9 @@ jobs:
|
|||
architecture: 'x64'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Black Code Formatter
|
||||
run: |
|
||||
pip install black
|
||||
black --diff --check msgpack/ test/ setup.py
|
||||
pip install black==22.1.0
|
||||
black -S --diff --check msgpack/ test/ setup.py
|
||||
|
|
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@ all: cython
|
|||
|
||||
.PHONY: black
|
||||
black:
|
||||
black msgpack/ test/ setup.py
|
||||
black -S msgpack/ test/ setup.py
|
||||
|
||||
.PHONY: cython
|
||||
cython:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# coding: utf-8
|
||||
from ._version import version
|
||||
from .exceptions import *
|
||||
from .ext import ExtType, Timestamp
|
||||
|
||||
|
@ -7,6 +6,10 @@ import os
|
|||
import sys
|
||||
|
||||
|
||||
version = (1, 0, 4, 'dev')
|
||||
__version__ = "1.0.4dev"
|
||||
|
||||
|
||||
if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2:
|
||||
from .fallback import Packer, unpackb, Unpacker
|
||||
else:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
version = (1, 0, 3)
|
|
@ -1,2 +1,5 @@
|
|||
# Also declared in pyproject.toml, if updating here please also update there
|
||||
Cython~=0.29.13
|
||||
|
||||
# dev only tools. no need to add pyproject
|
||||
black==22.1.0
|
||||
|
|
32
setup.cfg
Normal file
32
setup.cfg
Normal file
|
@ -0,0 +1,32 @@
|
|||
[metadata]
|
||||
name = msgpack
|
||||
#version = attr: msgpack.__version__
|
||||
version = attr: msgpack.version
|
||||
license = Apache 2.0
|
||||
author = Inada Naoki
|
||||
author_email = songofacandy@gmail.com
|
||||
description = MessagePack serializer
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
url = https://msgpack.org/
|
||||
|
||||
project_urls =
|
||||
Documentation = https://msgpack-python.readthedocs.io/
|
||||
Source = https://github.com/msgpack/msgpack-python
|
||||
Tracker = https://github.com/msgpack/msgpack-python/issues
|
||||
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
Programming Language :: Python :: Implementation :: PyPy
|
||||
Intended Audience :: Developers
|
||||
License :: OSI Approved :: Apache Software License
|
||||
|
||||
[flake8]
|
||||
max_line_length = 100
|
||||
|
42
setup.py
42
setup.py
|
@ -4,10 +4,9 @@ import io
|
|||
import os
|
||||
import sys
|
||||
from glob import glob
|
||||
from distutils.command.sdist import sdist
|
||||
from setuptools import setup, Extension
|
||||
|
||||
from distutils.command.build_ext import build_ext
|
||||
from setuptools.command.build_ext import build_ext
|
||||
from setuptools.command.sdist import sdist
|
||||
|
||||
|
||||
PYPY = hasattr(sys, "pypy_version_info")
|
||||
|
@ -65,12 +64,6 @@ class BuildExt(build_ext):
|
|||
print(e)
|
||||
|
||||
|
||||
exec(open("msgpack/_version.py").read())
|
||||
|
||||
version_str = ".".join(str(x) for x in version[:3])
|
||||
if len(version) > 3 and version[3] != "final":
|
||||
version_str += version[3]
|
||||
|
||||
# Cython is required for sdist
|
||||
class Sdist(sdist):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -99,39 +92,8 @@ if not PYPY and not PY2 and not os.environ.get("MSGPACK_PUREPYTHON"):
|
|||
del libraries, macros
|
||||
|
||||
|
||||
desc = "MessagePack (de)serializer."
|
||||
with io.open("README.md", encoding="utf-8") as f:
|
||||
long_desc = f.read()
|
||||
del f
|
||||
|
||||
setup(
|
||||
name="msgpack",
|
||||
author="Inada Naoki",
|
||||
author_email="songofacandy@gmail.com",
|
||||
version=version_str,
|
||||
cmdclass={"build_ext": BuildExt, "sdist": Sdist},
|
||||
ext_modules=ext_modules,
|
||||
packages=["msgpack"],
|
||||
description=desc,
|
||||
long_description=long_desc,
|
||||
long_description_content_type="text/markdown",
|
||||
url="https://msgpack.org/",
|
||||
project_urls={
|
||||
"Documentation": "https://msgpack-python.readthedocs.io/",
|
||||
"Source": "https://github.com/msgpack/msgpack-python",
|
||||
"Tracker": "https://github.com/msgpack/msgpack-python/issues",
|
||||
},
|
||||
license="Apache 2.0",
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: Python :: Implementation :: PyPy",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue