Skip to content

Commit

Permalink
BUG: fix broken github actions, cannot use absolute paths in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lzkelley committed Feb 7, 2024
1 parent f865e45 commit 56b02f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Documents and Documentation

The docs for this project are built with [Sphinx](http://www.sphinx-doc.org/en/master/).
The docs for this project are built with `Sphinx <http://www.sphinx-doc.org/en/master/>`_, and hosted on `readthedocs <https://holodeck-gw.readthedocs.io/en/main/>`_. The ``sphinx`` configuration is in the ``docs/source/conf.py`` file.


## Building Documentation
Expand Down
14 changes: 0 additions & 14 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@
holodeck
========

|version| |build| |docs|

.. |version|
image:: https://badge.fury.io/gh/nanograv%2Fholodeck.svg
target:: https://github.com/nanograv/holodeck
.. |build|
image:: https://github.com/nanograv/holodeck/actions/workflows/unit-tests-ci.yaml/badge.svg
target:: https://github.com/nanograv/holodeck/actions/workflows/unit-tests-ci.yaml
.. |docs|
image:: https://readthedocs.org/projects/holodeck-gw/badge/?version=main
target:: https://readthedocs.org/projects/holodeck-gw/
**Massive Black-Hole Binary Population Synthesis for Gravitational Wave Calculations ≋●≋●≋**

`holodeck on github <https://github.com/nanograv/holodeck>`_
Expand Down
19 changes: 5 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,32 @@
"""

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]

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

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

fname_vers = SETUP_PATH.joinpath('./holodeck/version.txt')
with open(fname_vers) as handle:
with open(join('.', 'holodeck', 'version.txt')) 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=[str(fname_cyutils)], # location of source code
sources=[join('.', 'holodeck', 'cyutils.pyx')], # location of source code
# define parameters external libraries
include_dirs=[
np.get_include()
Expand All @@ -55,10 +47,9 @@
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=[str(fname_sam_cyutils)], # location of source code
sources=[join('.', 'holodeck', 'sams', 'sam_cyutils.pyx')], # location of source code
# define parameters external libraries
include_dirs=[
np.get_include()
Expand Down

0 comments on commit 56b02f4

Please sign in to comment.