-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a full gdal + jni bindings .deb to python package; updated pom.…
…xml to latest gdal bindings; fixed an issue with argument parsing as a result of moving to gdal 3.10
- Loading branch information
Showing
11 changed files
with
114 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ install_requires = | |
mosaic = | ||
lib/*.jar | ||
resources/*.png | ||
gdal/*.deb | ||
|
||
|
||
[options.extras_require] | ||
dev = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,46 @@ | ||
import os | ||
import subprocess | ||
import sys | ||
|
||
try: | ||
from setuptools import setup | ||
except ImportError: | ||
from distutils.core import setup | ||
from setuptools.command.install import install | ||
|
||
class CustomInstallCommand(install): | ||
"""Custom install command to install .deb file.""" | ||
|
||
def run(self): | ||
# Run the standard installation process | ||
install.run(self) | ||
|
||
# Install the .deb file | ||
deb_file = os.path.join(os.path.dirname(__file__), 'mosaic', 'gdal', 'gdal_3.10.0-1_amd64.deb') | ||
|
||
if os.path.exists(deb_file): | ||
try: | ||
# Ensure root privileges for .deb installation | ||
if os.geteuid() != 0: | ||
print("You need root privileges to install the .deb package.") | ||
print("Please run this with sudo or as root.") | ||
sys.exit(1) | ||
|
||
# Run dpkg to install the .deb file | ||
try: | ||
subprocess.check_call(['dpkg', '-i', deb_file]) | ||
except subprocess.CalledProcessError as e: | ||
subprocess.check_call(['apt-get', 'install', '-f', '-y']) # Fix dependencies if needed | ||
subprocess.check_call(['dpkg', '-i', deb_file]) | ||
except subprocess.CalledProcessError as e: | ||
print(f"Error installing .deb package: {e}") | ||
sys.exit(1) | ||
else: | ||
print(f"Error: {deb_file} not found.") | ||
sys.exit(1) | ||
|
||
setup() | ||
setup( | ||
cmdclass={ | ||
"install": CustomInstallCommand | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters