mirror of
https://github.com/mvt-project/mvt.git
synced 2026-05-23 16:49:43 +02:00
Minimized setup.py and moved all possible to setup.cfg
This commit is contained in:
@@ -3,35 +3,10 @@
|
||||
# Use of this software is governed by the MVT License 1.1 that can be found at
|
||||
# https://license.mvt.re/1.1/
|
||||
|
||||
import os
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools import setup
|
||||
|
||||
from mvt.common.version import MVT_VERSION
|
||||
|
||||
this_directory = os.path.abspath(os.path.dirname(__file__))
|
||||
readme_path = os.path.join(this_directory, "README.md")
|
||||
with open(readme_path, encoding="utf-8") as handle:
|
||||
long_description = handle.read()
|
||||
|
||||
|
||||
def get_package_data(package):
|
||||
walk = [(dirpath.replace(package + os.sep, "", 1), filenames)
|
||||
for dirpath, dirnames, filenames in os.walk(package)
|
||||
if not os.path.exists(os.path.join(dirpath, "__init__.py"))]
|
||||
|
||||
filepaths = []
|
||||
for base, filenames in walk:
|
||||
filepaths.extend([os.path.join(base, filename)
|
||||
for filename in filenames])
|
||||
return {package: filepaths}
|
||||
|
||||
|
||||
setup(
|
||||
version=MVT_VERSION,
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
packages=find_packages(),
|
||||
package_data=get_package_data("mvt"),
|
||||
include_package_data=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user