Skip to content

Commit

Permalink
Add readthedocs configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaine committed Nov 30, 2023
1 parent cf723b7 commit 36e176b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
apt_packages:
- libsrtp2-dev
os: ubuntu-22.04
tools:
python: "3.11"

python:
install:
- method: pip
path: .
16 changes: 0 additions & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,6 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))

# Mock out binding
class MockLib:
ssrc_undefined = 0
ssrc_specific = 1
ssrc_any_inbound = 2
ssrc_any_outbound = 3

def srtp_init(self):
pass

class MockBinding:
ffi = None
lib = MockLib()

sys.modules.update({'pylibsrtp._binding': MockBinding()})

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down
9 changes: 1 addition & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os

import setuptools
from wheel.bdist_wheel import bdist_wheel

Expand All @@ -14,12 +12,7 @@ def get_tag(self):
return python, abi, plat


if os.environ.get("READTHEDOCS") == "True":
cffi_modules = []
else:
cffi_modules = ["src/_cffi_src/build_srtp.py:ffibuilder"]

setuptools.setup(
cffi_modules=cffi_modules,
cffi_modules = ["src/_cffi_src/build_srtp.py:ffibuilder"],
cmdclass={"bdist_wheel": bdist_wheel_abi3},
)

0 comments on commit 36e176b

Please sign in to comment.