Skip to content

Commit d2d765e

Browse files
authored
fix(ci, build scripts): clean up dependencies, fixing paths #29 from Peter-L-SVK/stage
2 parents 3f4f597 + 1d4d31f commit d2d765e

3 files changed

Lines changed: 26 additions & 24 deletions

File tree

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ recommendations. Extend with Python and Perl hooks for custom automation.
113113
# Install build dependencies
114114
sudo dnf install rpm-build rpmdevtools rpmlint python3-devel vte291-gtk4
115115

116+
pip install polars
117+
116118
# Clone and build
117119
git clone https://github.com/Peter-L-SVK/sql-schema-studio.git
118120
cd sql-schema-studio
@@ -133,10 +135,11 @@ sudo apt install -y python3-psycopg2 python3-gi python3-gi-cairo \
133135
python3-scikit-learn python3-matplotlib python3-cairo python3-paramiko \
134136
gir1.2-gtk-4.0 gir1.2-gtksource-5 libvte-2.91-gtk4-dev \
135137
python3-pipx
136-
137-
# Install dependencies with pipx
138-
pipx install faker kbcstorage scikit-learn
139138

139+
pip install polars --break-system-packages
140+
141+
# Install dependencies with pipx
142+
pipx install faker kbcstorage scikit-learn --include-deps
140143

141144
# Clone and build
142145
git clone https://github.com/Peter-L-SVK/sql-schema-studio.git
@@ -166,13 +169,15 @@ sudo apt install -y python3-psycopg2 python3-gi python3-gi-cairo \
166169
python3-sqlparse python3-keyring python3-numpy \
167170
python3-scikit-learn python3-matplotlib python3-cairo python3-paramiko \
168171
gir1.2-gtk-4.0 gir1.2-gtksource-5 libvte-2.91-gtk4-dev \
169-
python3-pipx
172+
pipx
173+
174+
pip install polars --break-system-packages
170175

171176
# Install pipx if not already installed (it's in the apt command above)
172177
# pipx ensures isolated Python package installations
173178

174179
# Install dependencies with pipx
175-
pipx install faker kbcstorage scikit-learn
180+
pipx install faker kbcstorage scikit-learn --include-deps
176181

177182
# Clone and install from source
178183
git clone https://github.com/Peter-L-SVK/sql-schema-studio.git
@@ -186,7 +191,7 @@ python3 -m src.main
186191

187192
```bash
188193
sudo dnf install python3-gobject gtk4 gtksourceview5 libadwaita cairo python3-cairo \
189-
python3-polars python3-paramiko python3-faker python3-kbcstorage vte291-gtk4
194+
python3-paramiko python3-faker python3-kbcstorage vte291-gtk4
190195

191196
git clone https://github.com/Peter-L-SVK/sql-schema-studio.git
192197
cd sql-schema-studio
@@ -209,13 +214,15 @@ sudo apt install -y python3-psycopg2 python3-gi python3-gi-cairo \
209214
python3-sqlparse python3-keyring python3-numpy \
210215
python3-matplotlib python3-cairo python3-paramiko \
211216
gir1.2-gtk-4.0 gir1.2-gtksource-5 libvte-2.91-gtk4-dev \
212-
python3-pipx postgresql postgresql-client
217+
pipx postgresql postgresql-client
218+
219+
pip install polars --break-system-packages
213220

214221
# Install pipx if not already installed
215222
# pipx ensures isolated Python package installations
216223

217224
# Install dependencies with pipx
218-
pipx install faker kbcstorage scikit-learn
225+
pipx install faker kbcstorage scikit-learn --include-deps
219226

220227
# (Optional) Start local PostgreSQL
221228
sudo service postgresql start

scripts/packaging/build_deb.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ mkdir -p ${BUILD_DIR}/${DEB_NAME}/usr/bin
1616
mkdir -p ${BUILD_DIR}/${DEB_NAME}/usr/lib/python3/dist-packages
1717

1818
# Copy Python source files as package
19-
mkdir -p ${BUILD_DIR}/${DEB_NAME}/usr/lib/python3/dist-packages/sql_schema_studio
20-
cp -r src/* ${BUILD_DIR}/${DEB_NAME}/usr/lib/python3/dist-packages/sql_schema_studio/
21-
22-
# Copy hooks
23-
mkdir -p ${BUILD_DIR}/${DEB_NAME}/usr/lib/python3/dist-packages/sql_schema_studio/hooks/python_hooks
24-
cp -r src/hooks/* ${BUILD_DIR}/${DEB_NAME}/usr/lib/python3/dist-packages/sql_schema_studio/hooks/ 2>/dev/null || true
19+
mkdir -p ${BUILD_DIR}/${DEB_NAME}/usr/lib/python3/dist-packages/src
20+
cp -r src/* ${BUILD_DIR}/${DEB_NAME}/usr/lib/python3/dist-packages/src/
2521

2622
# Remove __pycache__ if any
2723
find ${BUILD_DIR}/${DEB_NAME} -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
@@ -61,7 +57,7 @@ fi
6157
cat > ${BUILD_DIR}/${DEB_NAME}/usr/bin/sql-schema-studio << 'LAUNCHER'
6258
#!/bin/bash
6359
# SQL Schema Studio Launcher
64-
exec python3 -m sql_schema_studio.main "$@"
60+
exec python3 -m src.main "$@"
6561
LAUNCHER
6662
chmod +x ${BUILD_DIR}/${DEB_NAME}/usr/bin/sql-schema-studio
6763

@@ -85,7 +81,7 @@ Depends: python3 (>= 3.12),
8581
gir1.2-gtk-4.0,
8682
gir1.2-gtksource-5,
8783
libvte-2.91-gtk4-dev
88-
Recommends: python3-pipx
84+
Recommends: pipx
8985
Suggests: python3-faker, python3-kbcstorage
9086
Maintainer: Peter Leukanič <peter@leukanic.eu>
9187
Description: Intelligent PostgreSQL Management Platform
@@ -132,6 +128,7 @@ echo "✅ DEB built: ${DEB_NAME}.deb"
132128
echo "Install with: sudo dpkg -i ${DEB_NAME}.deb"
133129
echo "If dependencies fail, run: sudo apt --fix-broken install"
134130
echo ""
135-
echo "Optional dependencies (install after package):"
136-
echo " pipx install faker kbcstorage"
131+
echo " Other dependencies (install after package):"
132+
echo " pip install polars --break-system-packages"
133+
echo " pipx install faker kbcstorage scikit-learn --include-deps"
137134
echo " sudo apt install python3-faker python3-kbcstorage"

scripts/packaging/build_rpm.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ Requires: python3-gobject
9494
Requires: python3-sqlparse
9595
Requires: python3-keyring
9696
Requires: python3-numpy
97-
Requires: python3-pandas
9897
Requires: python3-scikit-learn
9998
Requires: python3-matplotlib
10099
Requires: python3-cairo
101100
Requires: python3-paramiko
102-
Requires: python3-kbcstorage
103101
Requires: gtk4
104102
Requires: gtksourceview5
105103
Requires: vte291-gtk4
@@ -123,8 +121,8 @@ Features:
123121
124122
%install
125123
# Create Python package directory - use absolute path
126-
mkdir -p %{buildroot}/usr/lib/python3/dist-packages/sql_schema_studio
127-
cp -r src/* %{buildroot}/usr/lib/python3/dist-packages/sql_schema_studio/
124+
mkdir -p %{buildroot}/usr/lib/python3/dist-packages/src
125+
cp -r src/* %{buildroot}/usr/lib/python3/dist-packages/src/
128126
129127
# Remove __pycache__
130128
find %{buildroot} -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
@@ -158,12 +156,12 @@ fi
158156
mkdir -p %{buildroot}/usr/bin
159157
cat > %{buildroot}/usr/bin/sql-schema-studio << 'LAUNCHER_EOF'
160158
#!/bin/bash
161-
exec python3 -m sql_schema_studio.main "$@"
159+
exec python3 -m src.main "$@"
162160
LAUNCHER_EOF
163161
chmod 755 %{buildroot}/usr/bin/sql-schema-studio
164162
165163
%files
166-
/usr/lib/python3/dist-packages/sql_schema_studio/
164+
/usr/lib/python3/dist-packages/src/
167165
/usr/bin/sql-schema-studio
168166
/usr/share/icons/hicolor/scalable/apps/sql-schema-studio.svg
169167
/usr/share/applications/sql-schema-studio.desktop

0 commit comments

Comments
 (0)