forked from streamlit/streamlit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
56 lines (47 loc) · 1.57 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
46
47
48
49
50
51
52
53
54
55
56
import platform
import setuptools
import subprocess
from pipenv.project import Project
from pipenv.utils import convert_deps_to_pip
from sys import version_info
pipfile = Project(chdir=False).parsed_pipfile
# Combine [packages] with either [python3] or [python2]
packages = pipfile["packages"].copy()
if version_info.major == 2:
packages.update(pipfile["python2"])
else:
packages.update(pipfile["python3"])
requirements = convert_deps_to_pip(packages, r=False)
# Check whether xcode tools are available before making watchdog a
# dependency (only if the current system is a Mac).
if (
platform.system() == "Darwin"
and subprocess.call(["xcode-select", "--version"], shell=False) != 0
):
try:
requirements.remove("watchdog")
except ValueError:
pass
def readme():
with open("README.md") as f:
return f.read()
setuptools.setup(
name="streamlit",
version="0.47.2", # PEP-440
description="Frontend library for machine learning engineers",
long_description=readme(),
url="https://streamlit.io",
author="Streamlit Inc",
author_email="hello@streamlit.io",
license="Apache 2",
packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
# Requirements
install_requires=requirements,
zip_safe=False, # install source files not egg
include_package_data=True, # copy html and friends
entry_points={"console_scripts": ["streamlit = streamlit.cli:main"]},
# For Windows so that streamlit * commands work ie.
# - streamlit version
# - streamlit hello
scripts=["bin/streamlit.cmd"],
)