pygtide 0.8.0__tar.gz → 0.8.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygtide-0.8.2/MANIFEST.in +4 -0
- {pygtide-0.8.0/pygtide.egg-info → pygtide-0.8.2}/PKG-INFO +4 -15
- {pygtide-0.8.0 → pygtide-0.8.2}/README.md +3 -14
- pygtide-0.8.2/build_pygtide_abi.py +47 -0
- pygtide-0.8.2/meson.build +74 -0
- {pygtide-0.8.0 → pygtide-0.8.2/pygtide.egg-info}/PKG-INFO +4 -15
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide.egg-info/SOURCES.txt +4 -2
- {pygtide-0.8.0 → pygtide-0.8.2}/pyproject.toml +2 -3
- pygtide-0.8.2/setup.py +40 -0
- pygtide-0.8.2/src/etpred.f90 +3529 -0
- pygtide-0.8.0/MANIFEST.in +0 -3
- pygtide-0.8.0/pygtide/etpred.so +0 -0
- pygtide-0.8.0/setup.py +0 -35
- {pygtide-0.8.0 → pygtide-0.8.2}/LICENSE +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/__init__.py +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/[raw]_Leap_Second_History.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/[raw]_eopc04_IAU2000.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/[raw]_finals2000A.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/buellehw.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/cted73hw.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/doodsehw.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/etddt.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/etddt_tmpl.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/etpolut1.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/hw95s.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/ksm03.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/ratgp95.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/tamurahw.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/commdat/xi1989hw.dat +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/core.py +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/tests.py +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide/update_etpred_data.py +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide.egg-info/dependency_links.txt +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide.egg-info/requires.txt +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/pygtide.egg-info/top_level.txt +0 -0
- {pygtide-0.8.0 → pygtide-0.8.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygtide
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: A Python module and wrapper for ETERNA PREDICT to compute gravitational tides on Earth
|
|
5
5
|
Author: Tom Eulenfeld
|
|
6
6
|
Author-email: "Gabriel C. Rau" <gabriel@hydrogeo.science>
|
|
@@ -49,18 +49,18 @@ There are two options:
|
|
|
49
49
|
* Download and install [*Anaconda*](https://www.anaconda.com/products/distribution) or [*Miniconda*](https://docs.conda.io/en/latest/miniconda.html)
|
|
50
50
|
* Install required packages:
|
|
51
51
|
```
|
|
52
|
-
conda install numpy pandas
|
|
52
|
+
conda install numpy pandas
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Installation options
|
|
56
56
|
|
|
57
|
-
#### Option 1: Install and compile source distribution from PyPi (Linux, macOS, Windows; Python
|
|
57
|
+
#### Option 1: Install and compile source distribution from PyPi (Python 3.8–3.11) or install pre-compiled distribution (Linux, macOS, Windows; Python>=3.12)
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
pip install pygtide
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
#### Option 2: Build from source locally (Linux, macOS, Windows; Python
|
|
63
|
+
#### Option 2: Build from source locally (Linux, macOS, Windows; Python>=3.8)
|
|
64
64
|
|
|
65
65
|
**Requirements for building:**
|
|
66
66
|
- A Fortran compiler (e.g., `gfortran` via MinGW on Windows; included in Linux/macOS gcc toolchains) `conda install gfortran`
|
|
@@ -78,17 +78,6 @@ cd /path/to/pygtide
|
|
|
78
78
|
pip install .
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
If Meson or Ninja are missing, pip will attempt to install them automatically. For faster builds, pre-install them:
|
|
82
|
-
```bash
|
|
83
|
-
pip install meson-python meson ninja
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
#### Option 3: Pre-built wheels (Windows, Python 3.8–3.11)
|
|
87
|
-
Download the correct wheel for your Python version from the `windows/` subfolder and install:
|
|
88
|
-
```powershell
|
|
89
|
-
pip install [wheel_name_depending_on_python_version]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
81
|
### After installation
|
|
93
82
|
|
|
94
83
|
* Run tests to verify installation:
|
|
@@ -19,18 +19,18 @@ There are two options:
|
|
|
19
19
|
* Download and install [*Anaconda*](https://www.anaconda.com/products/distribution) or [*Miniconda*](https://docs.conda.io/en/latest/miniconda.html)
|
|
20
20
|
* Install required packages:
|
|
21
21
|
```
|
|
22
|
-
conda install numpy pandas
|
|
22
|
+
conda install numpy pandas
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Installation options
|
|
26
26
|
|
|
27
|
-
#### Option 1: Install and compile source distribution from PyPi (Linux, macOS, Windows; Python
|
|
27
|
+
#### Option 1: Install and compile source distribution from PyPi (Python 3.8–3.11) or install pre-compiled distribution (Linux, macOS, Windows; Python>=3.12)
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
pip install pygtide
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
#### Option 2: Build from source locally (Linux, macOS, Windows; Python
|
|
33
|
+
#### Option 2: Build from source locally (Linux, macOS, Windows; Python>=3.8)
|
|
34
34
|
|
|
35
35
|
**Requirements for building:**
|
|
36
36
|
- A Fortran compiler (e.g., `gfortran` via MinGW on Windows; included in Linux/macOS gcc toolchains) `conda install gfortran`
|
|
@@ -48,17 +48,6 @@ cd /path/to/pygtide
|
|
|
48
48
|
pip install .
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
If Meson or Ninja are missing, pip will attempt to install them automatically. For faster builds, pre-install them:
|
|
52
|
-
```bash
|
|
53
|
-
pip install meson-python meson ninja
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
#### Option 3: Pre-built wheels (Windows, Python 3.8–3.11)
|
|
57
|
-
Download the correct wheel for your Python version from the `windows/` subfolder and install:
|
|
58
|
-
```powershell
|
|
59
|
-
pip install [wheel_name_depending_on_python_version]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
51
|
### After installation
|
|
63
52
|
|
|
64
53
|
* Run tests to verify installation:
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import shutil
|
|
3
|
+
import os
|
|
4
|
+
import glob
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def build():
|
|
9
|
+
# --- Configuration ---
|
|
10
|
+
print('Start Meson build')
|
|
11
|
+
build_dir = 'build_abi'
|
|
12
|
+
ext = 'pyd' if os.name == 'nt' else 'so'
|
|
13
|
+
|
|
14
|
+
# --- Step 1: Setup Meson build directory ---
|
|
15
|
+
if os.path.exists(build_dir):
|
|
16
|
+
print(f"Build directory '{build_dir}' already exists, skipping setup.")
|
|
17
|
+
else:
|
|
18
|
+
print(f"Setting up Meson build directory '{build_dir}'...")
|
|
19
|
+
subprocess.check_call(['meson', 'setup', build_dir])
|
|
20
|
+
# --- Step 2: Compile Meson targets ---
|
|
21
|
+
print("Compiling Meson targets...")
|
|
22
|
+
subprocess.check_call(['meson', 'compile', '-C', build_dir])
|
|
23
|
+
|
|
24
|
+
# --- Step 3: Copy ABI module to pygtide/ ---
|
|
25
|
+
print("Locating ABI module in build directory...")
|
|
26
|
+
build_path = os.path.abspath(build_dir)
|
|
27
|
+
pattern = os.path.join(build_path, '**', f'etpred*.{ext}')
|
|
28
|
+
matches = glob.glob(pattern, recursive=True)
|
|
29
|
+
|
|
30
|
+
if not matches:
|
|
31
|
+
print("ERROR: ABI module not found! Did Meson compile succeed?")
|
|
32
|
+
sys.exit(1)
|
|
33
|
+
|
|
34
|
+
dst = os.path.join(os.path.abspath('.'), 'pygtide', f'etpred.{ext}')
|
|
35
|
+
shutil.copy(matches[0], dst)
|
|
36
|
+
print(f"Copied ABI module {matches[0]} -> {dst}")
|
|
37
|
+
|
|
38
|
+
# --- Step 4: Clean up build directory ---
|
|
39
|
+
print(f"Deleting build directory '{build_dir}'...")
|
|
40
|
+
shutil.rmtree(build_dir)
|
|
41
|
+
print("Meson build complete!")
|
|
42
|
+
|
|
43
|
+
#print("\nNext step: run 'pip install .' or 'pip install -e .' to install the package.")
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
if __name__ == '__main__':
|
|
47
|
+
build()
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
project('pygtide', 'fortran',
|
|
2
|
+
version : '0.8.2',
|
|
3
|
+
meson_version : '>=1.1.0',
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
py = import('python').find_installation()
|
|
7
|
+
|
|
8
|
+
host_os = host_machine.system()
|
|
9
|
+
fc = meson.get_compiler('fortran')
|
|
10
|
+
|
|
11
|
+
if host_os == 'windows'
|
|
12
|
+
ext = 'pyd'
|
|
13
|
+
if fc.get_id() == 'msvc'
|
|
14
|
+
f90flags = ['/O2']
|
|
15
|
+
else
|
|
16
|
+
f90flags = ['-O3']
|
|
17
|
+
endif
|
|
18
|
+
else
|
|
19
|
+
ext = 'so'
|
|
20
|
+
f90flags = ['-fPIC', '-O3']
|
|
21
|
+
endif
|
|
22
|
+
|
|
23
|
+
src = 'src/etpred.f90'
|
|
24
|
+
f90_flag_args = ['--f90flags=' + ' '.join(f90flags)]
|
|
25
|
+
|
|
26
|
+
# --------------------------------------------------
|
|
27
|
+
# 1. Build f2py (ABI-tagged output)
|
|
28
|
+
# --------------------------------------------------
|
|
29
|
+
etpred_build = custom_target(
|
|
30
|
+
'etpred_build',
|
|
31
|
+
input : src,
|
|
32
|
+
output : 'etpred.build.stamp',
|
|
33
|
+
command : [
|
|
34
|
+
py,
|
|
35
|
+
'-m', 'numpy.f2py',
|
|
36
|
+
'-c',
|
|
37
|
+
] + f90_flag_args + [
|
|
38
|
+
'-m', 'etpred',
|
|
39
|
+
'@INPUT@',
|
|
40
|
+
],
|
|
41
|
+
build_by_default : true,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# --------------------------------------------------
|
|
45
|
+
# 2. Copy ABI module → pygtide/etpred.pyd
|
|
46
|
+
# --------------------------------------------------
|
|
47
|
+
copy_code = '''
|
|
48
|
+
import glob, os, shutil, sys
|
|
49
|
+
|
|
50
|
+
build_dir = os.getcwd()
|
|
51
|
+
src_root = r"@0@"
|
|
52
|
+
|
|
53
|
+
pattern = os.path.join(build_dir, '**', 'etpred*.@1@')
|
|
54
|
+
matches = glob.glob(pattern, recursive=True)
|
|
55
|
+
|
|
56
|
+
if not matches:
|
|
57
|
+
print("ERROR: etpred ABI module not found")
|
|
58
|
+
sys.exit(1)
|
|
59
|
+
|
|
60
|
+
dst = os.path.join(src_root, 'pygtide', 'etpred.@1@')
|
|
61
|
+
shutil.copy(matches[0], dst)
|
|
62
|
+
print(f"Copied {matches[0]} -> {dst}")
|
|
63
|
+
'''.format(
|
|
64
|
+
meson.project_source_root(),
|
|
65
|
+
ext
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
custom_target(
|
|
69
|
+
'copy_etpred',
|
|
70
|
+
input : etpred_build,
|
|
71
|
+
output : 'etpred.copy.stamp',
|
|
72
|
+
command : [py, '-c', copy_code],
|
|
73
|
+
build_by_default : true,
|
|
74
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygtide
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: A Python module and wrapper for ETERNA PREDICT to compute gravitational tides on Earth
|
|
5
5
|
Author: Tom Eulenfeld
|
|
6
6
|
Author-email: "Gabriel C. Rau" <gabriel@hydrogeo.science>
|
|
@@ -49,18 +49,18 @@ There are two options:
|
|
|
49
49
|
* Download and install [*Anaconda*](https://www.anaconda.com/products/distribution) or [*Miniconda*](https://docs.conda.io/en/latest/miniconda.html)
|
|
50
50
|
* Install required packages:
|
|
51
51
|
```
|
|
52
|
-
conda install numpy pandas
|
|
52
|
+
conda install numpy pandas
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Installation options
|
|
56
56
|
|
|
57
|
-
#### Option 1: Install and compile source distribution from PyPi (Linux, macOS, Windows; Python
|
|
57
|
+
#### Option 1: Install and compile source distribution from PyPi (Python 3.8–3.11) or install pre-compiled distribution (Linux, macOS, Windows; Python>=3.12)
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
pip install pygtide
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
#### Option 2: Build from source locally (Linux, macOS, Windows; Python
|
|
63
|
+
#### Option 2: Build from source locally (Linux, macOS, Windows; Python>=3.8)
|
|
64
64
|
|
|
65
65
|
**Requirements for building:**
|
|
66
66
|
- A Fortran compiler (e.g., `gfortran` via MinGW on Windows; included in Linux/macOS gcc toolchains) `conda install gfortran`
|
|
@@ -78,17 +78,6 @@ cd /path/to/pygtide
|
|
|
78
78
|
pip install .
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
If Meson or Ninja are missing, pip will attempt to install them automatically. For faster builds, pre-install them:
|
|
82
|
-
```bash
|
|
83
|
-
pip install meson-python meson ninja
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
#### Option 3: Pre-built wheels (Windows, Python 3.8–3.11)
|
|
87
|
-
Download the correct wheel for your Python version from the `windows/` subfolder and install:
|
|
88
|
-
```powershell
|
|
89
|
-
pip install [wheel_name_depending_on_python_version]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
81
|
### After installation
|
|
93
82
|
|
|
94
83
|
* Run tests to verify installation:
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
MANIFEST.in
|
|
3
3
|
README.md
|
|
4
|
+
build_pygtide_abi.py
|
|
5
|
+
meson.build
|
|
4
6
|
pyproject.toml
|
|
5
7
|
setup.py
|
|
6
8
|
pygtide/__init__.py
|
|
7
9
|
pygtide/core.py
|
|
8
|
-
pygtide/etpred.so
|
|
9
10
|
pygtide/tests.py
|
|
10
11
|
pygtide/update_etpred_data.py
|
|
11
12
|
pygtide.egg-info/PKG-INFO
|
|
@@ -26,4 +27,5 @@ pygtide/commdat/hw95s.dat
|
|
|
26
27
|
pygtide/commdat/ksm03.dat
|
|
27
28
|
pygtide/commdat/ratgp95.dat
|
|
28
29
|
pygtide/commdat/tamurahw.dat
|
|
29
|
-
pygtide/commdat/xi1989hw.dat
|
|
30
|
+
pygtide/commdat/xi1989hw.dat
|
|
31
|
+
src/etpred.f90
|
|
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
|
|
|
12
12
|
|
|
13
13
|
[project]
|
|
14
14
|
name = "pygtide"
|
|
15
|
-
version = "0.8.
|
|
15
|
+
version = "0.8.2"
|
|
16
16
|
description = "A Python module and wrapper for ETERNA PREDICT to compute gravitational tides on Earth"
|
|
17
17
|
readme = "README.md"
|
|
18
18
|
license = "MPL-2.0"
|
|
@@ -50,8 +50,7 @@ Issues = "https://github.com/hydrogeoscience/pygtide/issues"
|
|
|
50
50
|
# Setuptools-specific configuration
|
|
51
51
|
# ----------------------------
|
|
52
52
|
[tool.setuptools]
|
|
53
|
-
packages = ["pygtide"]
|
|
54
|
-
include-package-data = true # include package data
|
|
53
|
+
packages = ["pygtide"]
|
|
55
54
|
|
|
56
55
|
[tool.setuptools.package-data]
|
|
57
56
|
pygtide = ["etpred.*", "commdat/*"]
|
pygtide-0.8.2/setup.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# setup.py
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
from setuptools import setup, Distribution
|
|
6
|
+
from setuptools.command.build import build as _build
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class build(_build):
|
|
10
|
+
def run(self):
|
|
11
|
+
# Detect platform-specific ABI extension
|
|
12
|
+
here = Path(__file__).resolve().parent
|
|
13
|
+
ext = '.pyd' if sys.platform.startswith('win') else '.so'
|
|
14
|
+
etpred_path = here / 'pygtide' / f'etpred{ext}'
|
|
15
|
+
if etpred_path.exists():
|
|
16
|
+
print(f"Use ABI module {etpred_path}")
|
|
17
|
+
else:
|
|
18
|
+
print(f"Prebuilt ABI module not found: {etpred_path}\n"
|
|
19
|
+
"Run build_pygtide_abi.py")
|
|
20
|
+
sys.path.insert(0, str(here))
|
|
21
|
+
import build_pygtide_abi
|
|
22
|
+
# Start Meson build
|
|
23
|
+
build_pygtide_abi.build()
|
|
24
|
+
if not etpred_path.exists():
|
|
25
|
+
raise FileNotFoundError(f"No ABI module, error in Meson build")
|
|
26
|
+
super().run()
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# tell setuptools to build platform-dependent wheels
|
|
30
|
+
class BinaryDistribution(Distribution):
|
|
31
|
+
def has_ext_modules(self):
|
|
32
|
+
return True
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Metadata pulled from pyproject.toml
|
|
36
|
+
setup(
|
|
37
|
+
distclass=BinaryDistribution,
|
|
38
|
+
cmdclass={'build': build}
|
|
39
|
+
)
|
|
40
|
+
|