Skip to content

Commit

Permalink
Install all necessary deps on readthedocs
Browse files Browse the repository at this point in the history
Fixes problems where inline method docs did not appear
because relevant modules failed to import due to
missing dependencies.
  • Loading branch information
codewarrior0 committed Sep 10, 2016
1 parent 87a238e commit c48654e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
5 changes: 4 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../src')) # Folder containing mceditlib and mcedit2

# Expects mcedit2 to be installed via `setup.py install`, so `./src` is not
# added to sys.path.

sys.path.insert(0, os.path.abspath('extensions')) # extensions

# -- General configuration -----------------------------------------------------
Expand Down
16 changes: 16 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: mcedit2-docs

dependencies:
- python=2.7
- pyzmq
- pyside
- pyopengl
- ipython
- qtconsole
- pygments
- cython
- numpy
- pip:
- pastebin
- arrow
- git+https://github.com/mcedit/pysideuic-pkg
5 changes: 5 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
conda:
file: environment.yml

python:
setup_py_install: true
10 changes: 8 additions & 2 deletions setup_mcedit2.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""
setup-mcedit2
"""
from os import path

from setuptools import setup
import sys
from setuptools import setup, find_packages
from Cython.Build import cythonize
import numpy

Expand Down Expand Up @@ -30,6 +32,10 @@
for m in mcedit2_ext_modules:
m.include_dirs = include_dirs

sys.path.append(path.join(path.dirname(__file__), "src"))
from mcedit2.util.gen_ui import compile_ui
compile_ui()

setup(name='mcedit2',
version=version,
description="Interactive 3D World Editor for Minecraft Levels",
Expand All @@ -51,7 +57,7 @@
author_email='[email protected]',
url='https://github.com/mcedit/mcedit2',
license='MIT License',
packages=["mcedit2"],
packages=find_packages('src', include="mcedit2*"),
package_dir={'': 'src'},
ext_modules=mcedit2_ext_modules,
include_dirs=include_dirs,
Expand Down
4 changes: 2 additions & 2 deletions setup_mceditlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setup_mceditlib
"""

from setuptools import setup
from setuptools import setup, find_packages
from Cython.Build import cythonize

# Output annotated .html
Expand Down Expand Up @@ -47,7 +47,7 @@
author_email='[email protected]',
url='https://github.com/mcedit/mcedit2',
license='MIT License',
packages=["mceditlib"],
packages=find_packages('src', include="mceditlib*"),
package_dir={'': 'src'},
ext_modules=mceditlib_ext_modules,
include_dirs=include_dirs,
Expand Down

0 comments on commit c48654e

Please sign in to comment.