rda-python-dsarch 2.0.16__py3-none-any.whl → 2.0.17__py3-none-any.whl

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.
@@ -4957,6 +4957,10 @@ def main():
4957
4957
  Instantiates DsArch, parses arguments via read_parameters(), executes the
4958
4958
  requested action via start_actions(), and exits cleanly.
4959
4959
  """
4960
+ import sys
4961
+ if os.path.basename(sys.argv[0]) == 'setuid_dsarch':
4962
+ from rda_python_dsarch.dsarch_setup import main as setup_main
4963
+ setup_main()
4960
4964
  object = DsArch()
4961
4965
  object.read_parameters()
4962
4966
  object.start_actions()
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env python3
2
+ #
3
+ ##################################################################################
4
+ #
5
+ # Title: dsarch-setup
6
+ # Author: Zaihua Ji, zji@ucar.edu
7
+ # Date: 2026-05-12
8
+ # Purpose: Display the setuid setup guide for dsarch after pip install.
9
+ # Run automatically when setuid_dsarch is invoked directly instead
10
+ # of through the dsarch -> pywrapper setuid symlink.
11
+ #
12
+ # Github: https://github.com/NCAR/rda-python-dsarch.git
13
+ #
14
+ ##################################################################################
15
+
16
+ import os
17
+ import sys
18
+
19
+
20
+ SETUP_GUIDE = """
21
+ dsarch - Setuid Setup Guide
22
+ ===========================
23
+
24
+ dsarch must be run as the common user 'gdexdata' via the rda_python_setuid
25
+ mechanism. rda_python_setuid is installed automatically as a dependency.
26
+
27
+ If you are seeing this message after running 'setuid_dsarch' directly, it
28
+ means the setuid wrapper has not been set up yet. Follow the steps below.
29
+
30
+ Run 'pywrapper-install' with no arguments for the full pywrapper user guide.
31
+
32
+ Environment Setup
33
+ -----------------
34
+
35
+ Option A - Python venv (DECS machines):
36
+ python3 -m venv $ENVHOME # e.g. /glade/u/home/gdexdata/gdexmsenv
37
+ source $ENVHOME/bin/activate
38
+ pip install rda_python_dsarch
39
+
40
+ Option B - Conda (DAV/Casper):
41
+ conda activate pg-gdex # e.g. /glade/work/gdexdata/conda-envs/pg-gdex
42
+ pip install rda_python_dsarch
43
+
44
+ Full Setuid Install (requires sudo access to gdexdata)
45
+ ------------------------------------------------------
46
+
47
+ # Compile the pywrapper C binary (once per environment):
48
+ pywrapper-install --user gdexdata
49
+
50
+ # Wire up dsarch as a setuid entry:
51
+ pywrapper-install --link dsarch --user gdexdata
52
+
53
+ Simple Install (no sudo required, runs as current user)
54
+ -------------------------------------------------------
55
+
56
+ pywrapper-install --link dsarch --simple
57
+
58
+ This creates bin/dsarch -> bin/setuid_dsarch.
59
+ The program runs as the current user with no privilege change.
60
+
61
+ """
62
+
63
+
64
+ def main():
65
+ print(SETUP_GUIDE)
66
+ sys.exit(0)
67
+
68
+
69
+ if __name__ == '__main__': main()
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.4
2
+ Name: rda_python_dsarch
3
+ Version: 2.0.17
4
+ Summary: RDA Python package for utility program dsarch archive RDA data
5
+ Author-email: Zaihua Ji <zji@ucar.edu>
6
+ Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Requires-Python: >=3.7
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: rda_python_common
15
+ Requires-Dist: rda_python_setuid
16
+ Requires-Dist: rda_python_miscs
17
+ Dynamic: license-file
18
+
19
+ # dsarch
20
+
21
+ Python project to archive and maintain datasets for the [NSF NCAR Geoscience Data Exchange (GDEX)](https://gdex.ucar.edu).
22
+
23
+ The user guide for this utility tool can be viewed at: [User guide](https://gdex-docs-dsarch.readthedocs.io).
24
+
25
+ ## Setuid Setup
26
+
27
+ `dsarch` is executed as the common user `gdexdata` via the `rda_python_setuid`
28
+ setuid mechanism. `rda_python_setuid` is declared as a dependency and is
29
+ installed automatically with this package.
30
+
31
+ ### Environment setup
32
+
33
+ #### Option A — Python venv (DECS machines)
34
+
35
+ ```bash
36
+ python3 -m venv $ENVHOME # e.g. /glade/u/home/gdexdata/gdexmsenv
37
+ source $ENVHOME/bin/activate
38
+ pip install rda_python_dsarch
39
+ ```
40
+
41
+ #### Option B — Conda (DAV/Casper)
42
+
43
+ ```bash
44
+ conda activate pg-gdex # e.g. /glade/work/gdexdata/conda-envs/pg-gdex
45
+ pip install rda_python_dsarch
46
+ ```
47
+
48
+ ### Full setuid install (requires sudo access to gdexdata)
49
+
50
+ Run these steps once per environment after `pip install`:
51
+
52
+ ```bash
53
+ # Compile the pywrapper C binary (once per environment):
54
+ pywrapper-install --user gdexdata
55
+
56
+ # Wire up dsarch as a setuid entry:
57
+ pywrapper-install --link dsarch --user gdexdata
58
+ ```
59
+
60
+ `pywrapper-install` with no arguments displays the full user guide.
61
+
62
+ ### Simple install (no sudo required, runs as current user)
63
+
64
+ Users who do not need the setuid mechanism can create a direct symlink instead:
65
+
66
+ ```bash
67
+ pywrapper-install --link dsarch --simple
68
+ ```
69
+
70
+ This creates `bin/dsarch -> bin/setuid_dsarch` and the program runs as the
71
+ current user with no privilege change.
72
+
73
+ ### Setup guide
74
+
75
+ After `pip install`, run `dsarch-setup` at any time to display the setup guide:
76
+
77
+ ```bash
78
+ dsarch-setup
79
+ ```
80
+
81
+ The guide is also shown automatically if `setuid_dsarch` is invoked directly
82
+ before the setuid wrapper has been configured.
@@ -2,13 +2,14 @@ rda_python_dsarch/PgArch.py,sha256=d1Y87MT49tgQygLAffNff9Qs4c12KXspYyDG8liSnpQ,5
2
2
  rda_python_dsarch/PgMeta.py,sha256=FV4GytgnJK00FUlyM6iHqpNd7-XTVHO1j5tZtcLTWgY,26845
3
3
  rda_python_dsarch/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
4
  rda_python_dsarch/ds_arch.py,sha256=6bR0y6_rhIXyvbuYd-oZfL1YcaHhWBkojjzYz1yCrVg,233810
5
- rda_python_dsarch/dsarch.py,sha256=d0fHTYcCkTFQRJ3uA0_LyATew0M9tyL-99E7R0eDTtI,255211
5
+ rda_python_dsarch/dsarch.py,sha256=NEConPE8kIPGoEsmPjBdpeYqZW8p-OKMD1W8rxLO4Io,255368
6
6
  rda_python_dsarch/dsarch.usg,sha256=w26gjVm5BYZAX9h_6vHsDvFR6bLVeLFmWa4R7ROd-X4,105687
7
+ rda_python_dsarch/dsarch_setup.py,sha256=r69zh1pcRwYH9ka6_-oMX5IioDI7tFsGlcvnFRmXgh4,2092
7
8
  rda_python_dsarch/pg_arch.py,sha256=0mZGlQT9ecJr-92dloXDNtwF8EnPnY76IGLksqYsyYo,81057
8
9
  rda_python_dsarch/pg_meta.py,sha256=FFEkphGAT--66zvMNDPfiFG4nZQpXed_yVGMARdZb-o,46981
9
- rda_python_dsarch-2.0.16.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
10
- rda_python_dsarch-2.0.16.dist-info/METADATA,sha256=ZafAGoh2SGdmQCjpo-_8eftoSu1HNciKU5e3SKGgSRg,858
11
- rda_python_dsarch-2.0.16.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
- rda_python_dsarch-2.0.16.dist-info/entry_points.txt,sha256=GR7ShgBv8qixS2l4ufAu-jw3N09pbo9zRewwPHqaOxo,60
13
- rda_python_dsarch-2.0.16.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
14
- rda_python_dsarch-2.0.16.dist-info/RECORD,,
10
+ rda_python_dsarch-2.0.17.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
11
+ rda_python_dsarch-2.0.17.dist-info/METADATA,sha256=iiYib_f0_sbl7DQb2NU-aW28NoIHnnZQd1O_x0OXQOY,2419
12
+ rda_python_dsarch-2.0.17.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
13
+ rda_python_dsarch-2.0.17.dist-info/entry_points.txt,sha256=9P6XioifNVKguvlnW716G1HP0Oloezo6ZWPOa_pVwZQ,115
14
+ rda_python_dsarch-2.0.17.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
15
+ rda_python_dsarch-2.0.17.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ dsarch-setup = rda_python_dsarch.dsarch_setup:main
3
+ setuid_dsarch = rda_python_dsarch.dsarch:main
@@ -1,22 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: rda_python_dsarch
3
- Version: 2.0.16
4
- Summary: RDA Python package for utility program dsarch archive RDA data
5
- Author-email: Zaihua Ji <zji@ucar.edu>
6
- Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Classifier: Development Status :: 5 - Production/Stable
11
- Requires-Python: >=3.7
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: rda_python_common
15
- Requires-Dist: rda_python_setuid
16
- Dynamic: license-file
17
-
18
- # dsarch
19
-
20
- Python project to archive and maintain datasets for the [NSF NCAR Geoscience Data Exchange (GDEX)](https://gdex.ucar.edu).
21
-
22
- The user guide for this utility tool can be viewed at: [User guide](https://gdex-docs-dsarch.readthedocs.io).
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- dsarch.py = rda_python_dsarch.dsarch:main