Skip to content

Commit 7239ca4

Browse files
committed
Update setup etc. following other projects' example
1 parent fbf242c commit 7239ca4

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ htmlcov
4949

5050
# PyCharm
5151
.idea
52+
53+
sphinx_astropy/version.py
54+
pip-wheel-metadata/

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
requires = ["setuptools>=30.3.0",
3+
"setuptools_scm",
4+
"wheel"]
5+
build-backend = 'setuptools.build_meta'

setup.cfg

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
[metadata]
22
name = sphinx-astropy
3-
version = attr:sphinx_astropy.__version__
43
url = https://github.com/astropy/sphinx-astropy
54
author = The Astropy Developers
65
author_email = [email protected]
76
classifiers =
8-
Intended Audience :: Developers
9-
Programming Language :: Python
10-
Programming Language :: Python :: 2
11-
Programming Language :: Python :: 3
12-
Operating System :: OS Independent
13-
License :: OSI Approved :: BSD License
7+
Intended Audience :: Developers
8+
Programming Language :: Python
9+
Programming Language :: Python :: 3
10+
Operating System :: OS Independent
11+
License :: OSI Approved :: BSD License
1412
license = BSD
1513
description = Sphinx extensions and configuration specific to the Astropy project
1614
long_description = file: README.rst
17-
18-
[bdist_wheel]
19-
universal = 1
15+
long_description_content_type = text/x-rst
2016

2117
[options]
2218
zip_safe = False
2319
packages = find:
20+
python_requires = >=3.7
2421
install_requires =
2522
sphinx>=1.7
2623
astropy-sphinx-theme

setup.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22

33
# Licensed under a 3-clause BSD style license - see LICENSE.rst
44

5-
import sys
6-
import setuptools
7-
from distutils.version import LooseVersion
5+
import os
86
from setuptools import setup
97

10-
# Setuptools 30.3.0 or later is needed for setup.cfg options to be used
11-
if LooseVersion(setuptools.__version__) < LooseVersion('30.3.0'):
12-
sys.stderr.write("ERROR: sphinx-automodapi requires setuptools 30.3.0 or "
13-
"later (found {0})".format(setuptools.__version__))
14-
sys.exit(1)
15-
16-
setup()
8+
setup(
9+
use_scm_version={'write_to': os.path.join('sphinx_astropy', 'version.py')}
10+
)

sphinx_astropy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.4.dev0'
1+
from .version import version as __version__ # noqa

0 commit comments

Comments
 (0)