Skip to content

Commit

Permalink
Support ReadTheDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdemeyer committed Apr 14, 2017
1 parent ef5f92a commit ced6547
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
6 changes: 6 additions & 0 deletions readthedocs-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
channels:
- conda-forge
dependencies:
- gmp
- mpfr
- fplll
5 changes: 5 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
conda:
file: readthedocs-conda.yml
python:
version: 2.7
pip_install: true
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
from distutils.extension import Extension
import Cython.Build

import os
import subprocess
import sys

# When building with readthedocs, install the dependencies too.
# See https://github.com/rtfd/readthedocs.org/issues/2776
if "READTHEDOCS" in os.environ:
for reqs in ["requirements.txt", "suggestions.txt"]:
if os.path.isfile(reqs):
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", reqs])

from distutils.core import setup
from distutils.extension import Extension
import Cython.Build

from copy import copy


Expand Down Expand Up @@ -116,7 +125,7 @@
ext_modules=Cython.Build.cythonize(extensions,
include_path=["src"],
build_dir=cythonize_dir,
compiler_directives={'embedsignature': True}),
compiler_directives={'binding': True}),
package_dir={"": "src"},
packages=["fpylll", "fpylll.gmp", "fpylll.fplll", "fpylll.algorithms", "fpylll.tools"],
license='GNU General Public License, version 2 or later',
Expand Down
3 changes: 1 addition & 2 deletions suggestions.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ipython
sphinx
git+https://github.com/jdemeyer/sphinx
numpy

0 comments on commit ced6547

Please sign in to comment.