From 384b2a3ff81c3de85c30b59c77ee6cea1e469a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@ericsson.com> Date: Fri, 2 Aug 2024 12:07:39 +0200 Subject: [PATCH] added GIL --- .dockerignore | 2 -- .gitlab-ci.yml | 11 +++++++---- .readthedocs.yaml | 11 ----------- Dockerfile | 14 -------------- build-me.sh | 14 -------------- docs/conf.py | 6 +++--- setup.cfg | 4 ++-- setup.py | 6 ++++-- 8 files changed, 16 insertions(+), 52 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .readthedocs.yaml delete mode 100644 Dockerfile delete mode 100644 build-me.sh diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index f1b5f92..0000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -.git -build-me.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ec8a29..018e03c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,16 +6,19 @@ pages: stage: build image: zoo.smok.co/build/build:pages before_script: - - pip install --break-system-packages --upgrade Cython setuptools pip - - pip install --break-system-packages -r requirements.txt - - python setup.py build_ext --inplace + - pip3 install --break-system-packages --upgrade Cython setuptools pip + - pip3 install --break-system-packages -r requirements.txt + - python3 setup.py build_ext --inplace script: - cd docs - make html - - cp _build/html public + - mv _build/html ../public artifacts: paths: - "public" + only: + - master + needs: [] .test_python: stage: test diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 30e951d..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,11 +0,0 @@ -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/Dockerfile b/Dockerfile deleted file mode 100644 index 537ccfc..0000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM python:3.8 -RUN apt-get update && \ - apt-get install -y patchelf -RUN python -m pip install Cython pytest coverage pytest-cov - -WORKDIR /tmp/compile -ADD . /tmp/compile/ - -ENV DEBUG=1 - -RUN python setup.py install && \ - chmod ugo+x /tmp/compile/tests/test.sh - -CMD ["/tmp/compile/tests/test.sh"] diff --git a/build-me.sh b/build-me.sh deleted file mode 100644 index 0d704f3..0000000 --- a/build-me.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Env to set: -# * PYPI_USER -# * PYPI_PWD - -apt-get update -apt-get install -y patchelf -pip install auditwheel doctor-wheel twine cython -python setup.py bdist_wheel -cd dist -doctor-wheel "*.whl" -auditwheel repair --plat "manylinux2014_$(uname -m)" "*.whl" -twine upload -u $PYPI_USER -p $PYPI_PWD "wheelhouse/*.whl" diff --git a/docs/conf.py b/docs/conf.py index 1606893..7ed3a5e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,9 +10,9 @@ # 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. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys +sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- diff --git a/setup.cfg b/setup.cfg index bf14196..dd08d96 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,9 +9,9 @@ license_files = LICENSE author_email = piotr.maslanka@dronehub.ai description = A library for serializing JSON in a small binary format -url = https://github.com/smok-serwis/minijson +url = https://git.dms-serwis.com.pl/smokserwis/minijson project_urls = - Documentation = https://minijson.readthedocs.io/ + Documentation = https://smokserwis.docs.smok.co/minijson Code = https://git.dms-serwis.com.pl/smokserwis/minijson Issue tracker = https://git.dms-serwis.com.pl/smokserwis/minijson/-/issues classifier = diff --git a/setup.py b/setup.py index 6a80b7e..cbab448 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,9 @@ if 'TESTING' in os.environ: directive_defaults['linetrace'] = True directive_defaults['profiling'] = True directive_defaults['binding'] = True - macros = [('CYTHON_TRACE', '1'), ('CYTHON_TRACE_NOGIL', '1')] + macros = [('CYTHON_TRACE_NOGIL', '1')] -setup(ext_modules=cythonize([Extension("minijson", ["minijson.pyx"], define_macros=macros)])) +setup(ext_modules=cythonize([Extension("minijson", ["minijson.pyx"], define_macros=macros)], + compiler_directives=directive_defaults + )) -- GitLab