Ticket #1470: setup.py

File setup.py, 2.3 KB (added by Tom Goddard, 4 years ago)

Pip setup.py file to create chimerax wheel.

Line 
1#
2# This setup.py file creates a ChimeraX wheel for installation in a standard Python
3# distribution.
4#
5# python3 setup.py bdist_wheel
6#
7# This allows using headless ChimeraX on servers. Images can be saved
8# using osmesa and osmesa/setup.py will make a wheel for that library. Only a few of
9# the many dependencies needed by ChimeraX are listed (below see install_requires).
10# It might be worth making various optional dependency sets. Currently it is the
11# responsibility of the user to install additional dependencies based on their use case.
12#
13# Tested this on macOS 10.15.7.
14#
15from setuptools import setup, dist, find_namespace_packages
16from setuptools.command.install import install
17
18# force setuptools to recognize that this is
19# actually a binary distribution
20class BinaryDistribution(dist.Distribution):
21 def has_ext_modules(foo):
22 return True
23
24# Use README.md as long_description
25import os.path
26dir = os.path.abspath(os.path.dirname(__file__))
27with open(os.path.join(dir, 'README.md')) as f:
28 long_description = f.read()
29
30setup(
31 # this package is called mymodule
32 name = 'chimerax',
33
34 # Include all subpackages recursively
35 packages = find_namespace_packages(),
36
37 # Include shared libraries and data files
38 include_package_data = True,
39
40 # Brief description
41 description = "Analysis and visualization of molecular structures and 3D microscopy",
42
43 # Long description
44 long_description = long_description,
45 long_description_content_type = "text/markdown",
46
47 # See class BinaryDistribution that was defined earlier
48 distclass = BinaryDistribution,
49
50 version = '1.2.0',
51 url = 'https://github.com/RBVI/ChimeraX',
52 author = 'UCSF Computer Graphics Lab',
53 author_email = 'chimera-programmers@cgl.ucsf.edu',
54 license_files = ['LICENSE.md'],
55
56 install_requires = [
57 'numpy', # For atom coordinate arrays and microscopy images
58 'tinyarray', # For atom coordinates
59 'html2text', # To convert log output from html to plain text
60 'PyOpenGL', # Render images
61 'PyOpenGL_accelerate', # Render images
62 'Pillow', # Render images
63 ],
64
65 classifiers = [
66 'Development Status :: 5 - Production/Stable',
67 'License :: Other/Proprietary License',
68 'Intended Audience :: Science/Research',
69 'Programming Language :: Python :: 3.8',
70 ],
71)