-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
71 lines (65 loc) · 1.99 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import os
import subprocess
from setuptools import setup, find_packages
from setuptools.command.build_ext import build_ext
from setuptools.command.install import install
import sys
class CMakeBuild(build_ext):
def run(self):
# Ensure the build directory exists
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
# Run CMake to configure the build
subprocess.check_call(['cmake', '..'], cwd=self.build_temp)
# Run the build command
subprocess.check_call(['cmake', '--build', '.'], cwd=self.build_temp)
super().run()
class CustomInstall(install):
def run(self):
# Call the install command
install.run(self)
# Optionally run additional post-installation commands here
setup(
name='polsartools',
version='0.4.2',
description='A package for processing Polarimetric Synthetic Aperture Radar (PolSAR) data.',
author='Narayanarao Bhogapurapu',
author_email='bnarayanarao@iitb.ac.in',
packages=find_packages(),
install_requires=[
'numpy',
'gdal',
'scipy',
'click',
'simplekml',
],
extras_require={
'dev': [
'pytest',
'sphinx',
'doxygen',
],
},
entry_points={
'console_scripts': [
'polsartools=polsartools.cli:cli', # For CLI
],
},
python_requires='>=3.6',
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
cmdclass={
'build_ext': CMakeBuild,
'install': CustomInstall,
},
ext_modules=[],
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
)