Skip to content

Commit

Permalink
Fix doc generation and PyPI uploads by pinning to Python 3.7 (#500)
Browse files Browse the repository at this point in the history
* Per the [docs](https://blog.readthedocs.com/migrate-configuration-v2/), ReadTheDocs now requires a `version 2` config file. In it, we pin the version used to generate the docs to Python 3.7, which matches what is currently tested (and green) in CI.
* PyPI uploads were still configured to run on the latest version of Python (currently 3.12). We pin this back to Python 3.7, which make it less likely to break in mysterious ways.
  • Loading branch information
maxbelanger authored May 14, 2024
1 parent 3173f6e commit 52893f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pypiupload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [2.7, 3.x]
python-version: [2.7, 3.7]

steps:
- uses: actions/checkout@v2.3.4
Expand All @@ -34,9 +34,9 @@ jobs:
- name: Build
run: |
python setup.py bdist_wheel
- name: Build Sources (3.x)
- name: Build Sources (Python 3)
run: python setup.py sdist
if: matrix.python-version == '3.x'
if: ${{ matrix.python-version != '2.7' }}
- name: Publish
env:
TWINE_USERNAME: __token__
Expand Down
16 changes: 12 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# .readthedocs.yml
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Don't build any extra formats
# https://docs.readthedocs.io/en/latest/yaml-config.html#formats
formats: []
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.7"

sphinx:
configuration: docs/conf.py
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

# General information about the project.
project = u'Dropbox for Python'
copyright = u'2015-2019, Dropbox, Inc.'
copyright = u'2015-2024, Dropbox, Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down

0 comments on commit 52893f0

Please sign in to comment.