Skip to content

Commit

Permalink
BUG: readthedocs build error, 3
Browse files Browse the repository at this point in the history
  • Loading branch information
lzkelley committed Feb 7, 2024
1 parent 42c0e8d commit 00916ff
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'sphinx.ext.mathjax',
]

templates_path = ['_templates']
templates_path = []
exclude_patterns = []


Expand All @@ -41,7 +41,6 @@

# Define the configuration for sphinx-apidoc
apidoc_module_dir = 'source/apidoc_modules'
apidoc_output_dir = 'source'
apidoc_excluded_paths = ['../holodeck/detstats.py', '../holodeck/anisotropy.py', '../holodeck/librarian/_librarian.py']
apidoc_command_options = ' '.join([
'-e', # Create separate files for each module
Expand All @@ -54,11 +53,12 @@
def run_apidoc(_):
from sphinx.ext.apidoc import main
argv = [
'-o', apidoc_module_dir,
'-M',
'-T',
'-f',
'../holodeck'
'-o', apidoc_module_dir,
'../holodeck',
*apidoc_excluded_paths,
]
main(argv)

Expand Down
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
holodeck
========


|version| |build| |docs|

.. |version|
Expand Down
2 changes: 1 addition & 1 deletion holodeck/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import holodeck.librarian
import numpy as np
import kalepy as kale
from holodeck.sams import cyutils as sam_cyutils
from holodeck.sams import sam_cyutils

PSPACE = holo.librarian.param_spaces_classic.PS_Classic_Phenom_Uniform

Expand Down
File renamed without changes.
19 changes: 14 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,40 @@
"""

from pathlib import Path
from os.path import abspath, join
from setuptools import setup, find_packages
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy as np

SETUP_PATH = Path(__file__).absolute().resolve().parent
print(f"{SETUP_PATH=}")

# ---- Prepare Meta-Data ----

# NOTE: `short_description` gets first line of `__doc__` only (linebreaks not allowed by setuptools)
short_description = __doc__.strip().split('\n')[0]

with open("README.md", "r") as handle:
fname_desc = SETUP_PATH.joinpath("README.md")
with open(fname_desc, "r") as handle:
long_description = handle.read()

with open("requirements.txt", "r") as handle:
fname_reqs = SETUP_PATH.joinpath("requirements.txt")
with open(fname_reqs, "r") as handle:
requirements = handle.read()

with open('holodeck/version.txt') as handle:
fname_vers = SETUP_PATH.joinpath('./holodeck/version.txt')
with open(fname_vers) as handle:
version = handle.read().strip()


# ---- Handle cython submodules ----

fname_cyutils = SETUP_PATH.joinpath("holodeck", "cyutils.pyx")
ext_cyutils = Extension(
"holodeck.cyutils", # specify the resulting name/location of compiled extension
sources=[join('.', 'holodeck', 'cyutils.pyx')], # location of source code
sources=[str(fname_cyutils)], # location of source code
# define parameters external libraries
include_dirs=[
np.get_include()
Expand All @@ -47,9 +55,10 @@
extra_compile_args=['-Wno-unreachable-code-fallthrough', '-Wno-unused-function'],
)

fname_sam_cyutils = SETUP_PATH.joinpath("holodeck", "sams", "sam_cyutils.pyx")
ext_sam_cyutils = Extension(
"holodeck.sams.sam_cyutils", # specify the resulting name/location of compiled extension
sources=[join('.', 'holodeck', 'sams', 'sam_cyutils.pyx')], # location of source code
sources=[str(fname_sam_cyutils)], # location of source code
# define parameters external libraries
include_dirs=[
np.get_include()
Expand Down

0 comments on commit 00916ff

Please sign in to comment.