Skip to content

Commit 403535d

Browse files
committed
Additional Deb build changes partly related to WL#13985
- Use "Architecture: any" in "control" to get architecture "amd64" or "i386" in package names - Test if BYTE_CODE_ONLY is empty or not as condition, not a specific value in "rules" - Use a separate variable "BYTE_CODE_ONLY_OPT" in "rules" that conditionally is set to "--byte-code-only" if BYTE_CODE_ONLY is set in the environment
1 parent 721723a commit 403535d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

cpydist/data/deb/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Homepage: http://dev.mysql.com/downloads/connector/python/
99
X-Python3-Version: >= 3.4
1010

1111
Package: mysql-connector-python
12-
Architecture: all
12+
Architecture: any
1313
Depends:
1414
${python:Depends},
1515
${python2-protobuf:Depends}
@@ -21,7 +21,7 @@ Description: MySQL database driver written in pure Python
2121
@LICENSE@
2222

2323
Package: mysql-connector-python-py3
24-
Architecture: all
24+
Architecture: any
2525
Depends:
2626
${python3:Depends},
2727
${python3-protobuf:Depends},

cpydist/data/deb/rules

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ else
7777
PYTHON3_SUPPORTED=
7878
endif
7979

80-
ifeq ($(BYTE_CODE_ONLY), 1)
81-
BYTE_CODE_ONLY = --byte-code-only
80+
ifneq ($(BYTE_CODE_ONLY),)
81+
BYTE_CODE_ONLY_OPT = --byte-code-only
8282
EXTRA_OPTIONS_DH =
8383
else
84-
BYTE_CODE_ONLY =
84+
BYTE_CODE_ONLY_OPT =
8585
EXTRA_OPTIONS_DH = --buildsystem=python_distutils --with $(WITHPYTHON)
8686
endif
8787

@@ -105,7 +105,7 @@ override_dh_auto_install:
105105
--with-protoc=$(MYSQLXPB_PROTOC) \
106106
--extra-compile-args="$(EXTRA_COMPILE_ARGS)" \
107107
--extra-link-args="$(EXTRA_LINK_ARGS)" $(OPENSSL_OPT) \
108-
--root $$DESTDIR $(BYTE_CODE_ONLY); \
108+
--root $$DESTDIR $(BYTE_CODE_ONLY_OPT); \
109109
find $$DESTDIR -name 'mysql_connector_*.egg-info' -prune -exec rm -rf {} \;; \
110110
done
111111

@@ -122,7 +122,7 @@ override_dh_auto_install:
122122
--with-protoc=$(MYSQLXPB_PROTOC) \
123123
--extra-compile-args="$(EXTRA_COMPILE_ARGS)" \
124124
--extra-link-args="$(EXTRA_LINK_ARGS)" $(OPENSSL_OPT) \
125-
--root $$DESTDIR $(BYTE_CODE_ONLY); \
125+
--root $$DESTDIR $(BYTE_CODE_ONLY_OPT); \
126126
find $$DESTDIR -name 'mysql_connector_*.egg-info' -prune -exec rm -rf {} \;; \
127127
done
128128

@@ -132,7 +132,7 @@ override_dh_python2:
132132
override_dh_python3:
133133
dh_python3 --no-ext-rename
134134

135-
ifeq ($(BYTE_CODE_ONLY), --byte-code-only)
135+
ifneq ($(BYTE_CODE_ONLY),)
136136
override_dh_pysupport:
137137
# Skipped. We need to keep the .pyc files.
138138
endif

0 commit comments

Comments
 (0)