-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
45 lines (34 loc) · 1.19 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = ["Matthew Wisdom"]
import codecs
import toml
from setuptools import find_packages, setup
pyproject = toml.load("pyproject.toml")
def long_description():
"""Read and return README as long description."""
with codecs.open("README.md", encoding="utf-8-sig") as f:
return f.read()
pyproject = toml.load("pyproject.toml")
def setup_package():
"""Set up package."""
setup(
author=pyproject["tool"]["poetry"]["authors"][0],
description=pyproject["tool"]["poetry"]["description"],
include_package_data=True,
install_requires=pyproject["tool"]["poetry"]["dependencies"],
keywords=[],
license=pyproject["tool"]["poetry"]["license"],
long_description=long_description(),
name=pyproject["tool"]["poetry"]["name"],
packages=find_packages(
where=".",
exclude=["tests", "tests.*"],
),
url=pyproject["tool"]["poetry"]["repository"],
setup_requires=pyproject["build-system"]["requires"],
version=pyproject["tool"]["poetry"]["version"],
zip_safe=True,
)
if __name__ == "__main__":
setup_package()