diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a060c9c5cb03ea1d0764e25d7c00b80855679c33..14838092f2b1b74432d432b561e9632d7aae31a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -118,4 +118,30 @@ build_python310: build_python311: extends: .build_python - image: python:3.11 \ No newline at end of file + image: python:3.11 + + + +.build_python: + stage: build + script: + - pip install --break-system-packages --upgrade Cython setuptools pip repairwheel doctor-wheel + - pip install --break-system-packages -r requirements.txt + - python setup.py bdist_wheel + - repairwheel dist/*.whl -o . + - doctor-wheel *.whl + artifacts: + paths: + - "*.whl" + after_script: + - pip install twine + - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi *.whl + only: + - tags + except: + - branches + + +deploy_python35: + extends: .build_python + image: python:3.5 \ No newline at end of file diff --git a/snakehouse/bootstrap.py b/snakehouse/bootstrap.py index 0842c8be353280650e054ef7cd3b7c2f452ff532..fdac1920334917d31d1371fb237a9b8b60f478dd 100644 --- a/snakehouse/bootstrap.py +++ b/snakehouse/bootstrap.py @@ -24,7 +24,7 @@ cdef extern from "{cdef_section.h_file_name}": if name == "{getdef_section.module_name}": return PyInit_{getdef_section.coded_module_name}()""", getdef_section=getdef_section) else: - output.append(""" elif name == "{getdef_section.module_name}":) + output.append(""" elif name == "{getdef_section.module_name}": return PyInit_{getdef_section.coded_module_name}()""", getdef_section=getdef_section) output.append_many("""