|
4 | 4 | import os |
5 | 5 | import sys |
6 | 6 | from glob import glob |
7 | | -from distutils.command.sdist import sdist |
8 | 7 | from setuptools import setup, Extension |
9 | | - |
10 | | -from distutils.command.build_ext import build_ext |
| 8 | +from setuptools.command.build_ext import build_ext |
| 9 | +from setuptools.command.sdist import sdist |
11 | 10 |
|
12 | 11 |
|
13 | 12 | PYPY = hasattr(sys, "pypy_version_info") |
@@ -65,12 +64,6 @@ def build_extension(self, ext): |
65 | 64 | print(e) |
66 | 65 |
|
67 | 66 |
|
68 | | -exec(open("msgpack/_version.py").read()) |
69 | | - |
70 | | -version_str = ".".join(str(x) for x in version[:3]) |
71 | | -if len(version) > 3 and version[3] != "final": |
72 | | - version_str += version[3] |
73 | | - |
74 | 67 | # Cython is required for sdist |
75 | 68 | class Sdist(sdist): |
76 | 69 | def __init__(self, *args, **kwargs): |
@@ -99,39 +92,8 @@ def __init__(self, *args, **kwargs): |
99 | 92 | del libraries, macros |
100 | 93 |
|
101 | 94 |
|
102 | | -desc = "MessagePack (de)serializer." |
103 | | -with io.open("README.md", encoding="utf-8") as f: |
104 | | - long_desc = f.read() |
105 | | -del f |
106 | | - |
107 | 95 | setup( |
108 | | - name="msgpack", |
109 | | - author="Inada Naoki", |
110 | | - |
111 | | - version=version_str, |
112 | 96 | cmdclass={"build_ext": BuildExt, "sdist": Sdist}, |
113 | 97 | ext_modules=ext_modules, |
114 | 98 | packages=["msgpack"], |
115 | | - description=desc, |
116 | | - long_description=long_desc, |
117 | | - long_description_content_type="text/markdown", |
118 | | - url="https://msgpack.org/", |
119 | | - project_urls={ |
120 | | - "Documentation": "https://msgpack-python.readthedocs.io/", |
121 | | - "Source": "https://github.com/msgpack/msgpack-python", |
122 | | - "Tracker": "https://github.com/msgpack/msgpack-python/issues", |
123 | | - }, |
124 | | - license="Apache 2.0", |
125 | | - classifiers=[ |
126 | | - "Programming Language :: Python :: 3", |
127 | | - "Programming Language :: Python :: 3.6", |
128 | | - "Programming Language :: Python :: 3.7", |
129 | | - "Programming Language :: Python :: 3.8", |
130 | | - "Programming Language :: Python :: 3.9", |
131 | | - "Programming Language :: Python :: 3.10", |
132 | | - "Programming Language :: Python :: Implementation :: CPython", |
133 | | - "Programming Language :: Python :: Implementation :: PyPy", |
134 | | - "Intended Audience :: Developers", |
135 | | - "License :: OSI Approved :: Apache Software License", |
136 | | - ], |
137 | 99 | ) |
0 commit comments