From f2365e5b50b7ef078f09131b6a137a4614159a43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Tue, 6 Jul 2021 14:27:50 +0200
Subject: [PATCH] compile for release

---
 .travis.yml | 8 ++++++--
 setup.py    | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 15d6c5b..c5d724c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,9 +38,11 @@ jobs:
     - stage: deploy
       python: "3.8"
       before_script:
+        - apt-get update
+        - apt-get install -y patchelf
         - pip install wheel twine doctor-wheel auditwheel snakehouse satella
       script:
-        - python setup.py bdist_wheel sdist
+        - RELEASE=1 python setup.py bdist_wheel sdist
         - cd dist
         - doctor-wheel *.whl
         - auditwheel repair --plat manylinux2014_x86_64 *.whl
@@ -48,9 +50,11 @@ jobs:
     - stage: deploy
       python: "3.9"
       before_script:
+        - apt-get update
+        - apt-get install -y patchelf
         - pip install wheel twine doctor-wheel auditwheel snakehouse satella
       script:
-        - python setup.py bdist_wheel
+        - RELEASE=1 python setup.py bdist_wheel
         - cd dist
         - doctor-wheel *.whl
         - auditwheel repair --plat manylinux2014_x86_64 *.whl
diff --git a/setup.py b/setup.py
index 45a8f88..a72b84d 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ monkey_patch_parallel_compilation()
 directives = {'language_level': '3'}
 ext_kwargs = {}
 cythonize_kwargs = {}
-if 'CI' in os.environ:
+if 'CI' in os.environ and 'RELEASE' not in os.environ:
     ext_kwargs['define_macros'] = [("CYTHON_TRACE_NOGIL", "1")]
     directives.update(profile=True, linetrace=True, embedsignature=True)
     cythonize_kwargs['gdb_debug'] = True
-- 
GitLab