-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
94 lines (83 loc) · 3.16 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright (c) 2013, 2018 National Technology and Engineering Solutions of Sandia, LLC.
# Under the terms of Contract DE-NA0003525 with National Technology and Engineering
# Solutions of Sandia, LLC, the U.S. Government retains certain rights in this software.
# This script creates a Python distribution wheel for the Slycat python interface,
# now called slypi, formerly called slycat-web-client. When run, it copies the latest
# version of the slycat/web/client files (from the slycat repo) into slypi directory
# (see note below) before it constructs the pip installable module.
#
# NOTE: You need to have the slycat directory (from github) available as ../slycat
# in order to run the setup.py file (see additional note below).
#
# S. Martin
# 11/9/2023
# To publish to PyPi, perform the following steps:
#
# $ rm -rf dist
# $ python setup.py sdist bdist_wheel
# $ twine upload dist/*
#
# To publish to testpypi, use:
#
# $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
#
# The first step builds the distribution, and the second step
# uploads to PyPi. To install the package from another computer use:
#
# $ pip install slpyi
#
# To install from testpypi, use:
#
# $ pip install --extra-index-url https://testpypi.python.org/pypi slpyi
# --upgrade --trusted-host testpypi.python.org --proxy wwwproxy.sandia.gov:80
#
# To install locally, use (from this directory):
#
# $ pip install -e .
from shutil import copyfile
# copy slycat.darray and slycat csv parser code into slypi directory. This
# makes slypi a Python package without other Slycat dependencies.
copyfile('../slycat/packages/slycat/darray.py', 'slypi/darray.py')
copyfile('../slycat/packages/slycat/pandas_util.py', 'slypi/pandas_util.py')
copyfile('../slycat/web-server/plugins/slycat-video-swarm/vs-parse-files.py', 'slypi/vs/vs_parse_files.py')
import slypi
VERSION = slypi.__version__
# get README.md
import pathlib
# directory containing this file
HERE = pathlib.Path(__file__).parent
# text of the web-client-readme.txt file
README = (HERE / "README.md").read_text()
# create distribution
import setuptools
# create Python distribution wheel
from setuptools import setup
setup(
name="slypi",
version=VERSION,
description="Slycat python interface utilties for interacting with the Slycat " +
"data analysis and visualization server.",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/sandialabs/slypi",
author="Shawn Martin",
author_email="smartin@sandia.gov",
license="Sandia",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
],
packages=setuptools.find_packages(),
include_package_data=True,
install_requires=["requests", "requests-kerberos",
"numpy", "scikit-learn",
"pandas", "meshio", "imageio[ffmpeg]",
"matplotlib", "ipyparallel",
"torch", "umap-learn", "pymks"],
entry_points={
"console_scripts": [
"ps_upload_csv=slypi.ps.upload_csv:main",
"dac_upload_gen=slycat.dac.upload_gen:main"
]
},
)