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 d1d29ed
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 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
19 changes: 14 additions & 5 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 All @@ -21,7 +30,7 @@
"library_dirs": library_dirs,
"language": "c++",
"libraries": ["gmp", "mpfr", "fplll"],
"extra_compile_args": ["-std=c++11"],
"extra_compile_args": ["-std=c++11", "-D_GLIBCXX_USE_CXX11_ABI=0"],
"extra_link_args": ["-std=c++11"]}

other = {"include_dirs": include_dirs,
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 d1d29ed

Please sign in to comment.