forked from sphinx-gallery/sphinx-gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
64 lines (59 loc) · 2.03 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
# -*- coding: utf-8 -*-
# Author: Óscar Nájera
# License: 3-clause BSD
"""
Installer Sphinx extension for gallery generator
"""
import codecs
import os
from setuptools import setup, find_packages
import sphinx_gallery
# get the long and short descriptions from the README
with codecs.open('README.rst', mode='r', encoding='utf-8') as f:
long_description = f.read()
description, in_ = '', False
for line in long_description.splitlines():
if not in_:
if len(line) and not line.startswith(('.', '=', ' ')) and \
line != 'Sphinx-Gallery':
in_ = True
if in_:
if len(line) == 0:
break
else:
description += line + ' '
description = description.strip()
# Get the requirements from requirements.txt and environment
with open('requirements.txt', 'r') as fid:
install_requires = [line.strip() for line in fid if line.strip()]
setup(
name="sphinx-gallery",
description=description, # noqa: E501, analysis:ignore
long_description=long_description,
long_description_content_type='text/x-rst',
version=sphinx_gallery.__version__,
packages=find_packages(),
package_data={'sphinx_gallery': [
'_static/sg_gallery*.css',
'_static/no_image.png',
'_static/broken_example.png',
'_static/binder_badge_logo.svg',
'_static/jupyterlite_badge_logo.svg'
]},
scripts=['bin/copy_sphinxgallery.sh', 'bin/sphx_glr_python_to_jupyter.py'],
url="https://sphinx-gallery.github.io",
project_urls={
"Source": "https://github.com/sphinx-gallery/sphinx-gallery",
"Documentation": "https://sphinx-gallery.github.io",
},
author="Óscar Nájera",
author_email='[email protected]',
install_requires=install_requires,
python_requires='>=3.7',
license='3-clause BSD',
classifiers=['Intended Audience :: Developers',
'Development Status :: 4 - Beta',
'Framework :: Sphinx :: Extension',
'Programming Language :: Python',
],
)