Skip to content

Commit 7b0f4e5

Browse files
committed
Support readthedocs
This is mostly copied from fpylll
1 parent 77d0c81 commit 7b0f4e5

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

readthedocs-conda.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
- pari

readthedocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
conda:
2+
file: readthedocs-conda.yml
3+
python:
4+
version: 2.7
5+
pip_install: true

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
setuptools
2+
Cython
3+
cysignals
4+
Sphinx>=1.6

setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
#!/usr/bin/env python
2+
3+
import os
14
import sys
5+
6+
if "READTHEDOCS" in os.environ:
7+
# When building with readthedocs, install the dependencies too.
8+
# See https://github.com/rtfd/readthedocs.org/issues/2776
9+
for reqs in ["requirements.txt"]:
10+
if os.path.isfile(reqs):
11+
from subprocess import check_call
12+
check_call([sys.executable, "-m", "pip", "install", "-r", reqs])
13+
14+
215
from setuptools import setup
316
from distutils.command.build_ext import build_ext as _build_ext
417
from setuptools.command.bdist_egg import bdist_egg as _bdist_egg
518
from setuptools.extension import Extension
619

720

8-
921
# Adapted from Cython's new_build_ext
1022
class build_ext(_build_ext):
1123
def finalize_options(self):

0 commit comments

Comments
 (0)