Skip to content

Commit 8167b07

Browse files
authored
Merge pull request #42 from saimn/actions-followup
Setup actions etc.
2 parents fbf242c + 2b74db5 commit 8167b07

File tree

10 files changed

+31
-80
lines changed

10 files changed

+31
-80
lines changed

.circleci/config.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
build-n-publish:
1111
name: Build and publish Python 🐍 distributions 📦 to PyPI
1212
runs-on: ubuntu-latest
13-
if: github.repository == 'astropy/pytest-doctestplus'
1413
if: (github.repository == 'astropy/sphinx-astropy' && (github.event_name == 'tags' || contains(github.event.pull_request.labels.*.name, 'Build wheels')))
1514

1615
steps:
@@ -38,7 +37,7 @@ jobs:
3837
cd ..
3938
python -m venv testenv
4039
testenv/bin/pip install pytest sphinx-astropy/dist/*.whl
41-
testenv/bin/pytest sphinx-astropy/tests
40+
testenv/bin/pytest sphinx-astropy/sphinx_astropy
4241
4342
- name: Publish distribution 📦 to PyPI
4443
if: startsWith(github.ref, 'refs/tags')

.github/workflows/python-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,28 @@ jobs:
1919
include:
2020
- os: ubuntu-latest
2121
python-version: 3.7
22-
toxenv: py36-test-sphinx17
22+
toxenv: py37-test-sphinx17
2323
- os: windows-latest
2424
python-version: 3.7
25-
toxenv: py36-test-sphinx18
25+
toxenv: py37-test-sphinx18
2626
- os: macos-latest
2727
python-version: 3.7
2828
toxenv: py37-test-sphinx20
2929
- os: ubuntu-latest
3030
python-version: 3.8
31-
toxenv: py37-test-sphinx24
31+
toxenv: py38-test-sphinx24
3232
- os: windows-latest
3333
python-version: 3.8
3434
toxenv: py38-test-sphinx30
3535
- os: ubuntu-latest
3636
python-version: 3.9
37-
toxenv: py38-test-sphinx35
37+
toxenv: py39-test-sphinx35
3838
- os: ubuntu-latest
3939
python-version: 3.9
4040
toxenv: py39-test-sphinx40
4141
- os: macos-latest
4242
python-version: 3.9
43-
toxenv: py38-test-sphinxdev
43+
toxenv: py39-test-sphinxdev
4444

4545
steps:
4646
- uses: actions/checkout@v2

.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: 9 additions & 12 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
@@ -30,8 +27,8 @@ install_requires =
3027
pillow
3128

3229
[options.extras_require]
33-
all =
34-
astropy
30+
all = astropy
31+
tests = pytest
3532

3633
[options.package_data]
3734
sphinx_astropy = local/*

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

sphinx_astropy/ext/changelog_links.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77
from __future__ import print_function
88

99
import re
10-
from distutils.version import LooseVersion
1110
from docutils.nodes import Text, reference
1211

13-
from sphinx import __version__
14-
15-
BLOCK_PATTERN = re.compile('\[#.+\]', flags=re.DOTALL)
12+
BLOCK_PATTERN = re.compile(r'\[#.+\]', flags=re.DOTALL)
1613
ISSUE_PATTERN = re.compile('#[0-9]+')
1714

1815

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ isolated_build = true
1010
[testenv]
1111
changedir = .tmp/{envname}
1212
description = run tests
13+
extras = tests
1314
deps =
1415
sphinx17: sphinx==1.7.*
1516
sphinx18: sphinx==1.8.*
@@ -22,7 +23,7 @@ deps =
2223

2324
commands =
2425
pip freeze
25-
pytest {toxinidir}/tests {posargs}
26+
pytest {toxinidir}/sphinx_astropy {posargs}
2627

2728
[testenv:codestyle]
2829
changedir =

0 commit comments

Comments
 (0)