From cca9d3f57984ab945fcd6b5c7e8aea8aca1280e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@ericsson.com> Date: Fri, 5 Apr 2024 12:16:14 +0200 Subject: [PATCH] fix the docs --- .gitignore | 1 + .readthedocs.yaml | 11 +++++++++++ setup.cfg | 2 +- setup.py | 11 +++++++---- 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.gitignore b/.gitignore index 0a76ed3..239222d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ lib/ lib64/ parts/ sdist/ +wheelhouse/ var/ wheels/ pip-wheel-metadata/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..30e951d --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,11 @@ +version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.9" + jobs: + pre_create_environment: + - pip install psutil Cython Sphinx +sphinx: + builder: html + configuration: docs/conf.py diff --git a/setup.cfg b/setup.cfg index 51a12f0..273ff87 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # coding: utf-8 [metadata] -version = 2.12a1 +version = 2.12 name = minijson long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8 diff --git a/setup.py b/setup.py index 8737401..d1ce8c0 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,10 @@ import os -from Cython.Build import cythonize -from Cython.Compiler.Options import get_directive_defaults +try: + from Cython.Build import cythonize + from Cython.Compiler.Options import get_directive_defaults +except ImportError: + print('Install Cython in order to build from source') from setuptools import setup, Extension directive_defaults = get_directive_defaults() @@ -14,5 +17,5 @@ if 'DEBUG' in os.environ: directive_defaults['binding'] = True macros = [('CYTHON_TRACE', '1')] -setup(ext_modules=cythonize([Extension("minijson", ["minijson.pyx"], - define_macros=macros)])) + +setup(ext_modules=cythonize([Extension("minijson", ["minijson.pyx"], define_macros=macros)])) -- GitLab