rda-python-dsarch 1.0.9__tar.gz → 1.0.12__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.
Files changed (19) hide show
  1. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/MANIFEST.in +0 -1
  2. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/PKG-INFO +4 -2
  3. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/pyproject.toml +3 -2
  4. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch/dsarch.py +5 -5
  5. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch.egg-info/PKG-INFO +4 -2
  6. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch.egg-info/SOURCES.txt +0 -1
  7. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch.egg-info/requires.txt +1 -0
  8. rda_python_dsarch-1.0.9/src/rda_python_dsarch/dsarch.c +0 -41
  9. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/LICENSE +0 -0
  10. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/README.md +0 -0
  11. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/setup.cfg +0 -0
  12. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch/PgArch.py +0 -0
  13. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch/PgMeta.py +0 -0
  14. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch/__init__.py +0 -0
  15. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch/dsarch.usg +0 -0
  16. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch.egg-info/dependency_links.txt +0 -0
  17. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch.egg-info/entry_points.txt +0 -0
  18. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/src/rda_python_dsarch.egg-info/top_level.txt +0 -0
  19. {rda_python_dsarch-1.0.9 → rda_python_dsarch-1.0.12}/tests/test_dsarch.py +0 -0
@@ -1,2 +1 @@
1
1
  include src/rda_python_dsarch/dsarch.usg
2
- include src/rda_python_dsarch/dsarch.c
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.9
3
+ Version: 1.0.12
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
@@ -12,5 +12,7 @@ Requires-Python: >=3.7
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: rda_python_common
15
+ Requires-Dist: rda_python_setuid
16
+ Dynamic: license-file
15
17
 
16
18
  RDA python Package to archive and maintain RDA datasets.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_dsarch"
7
- version = "1.0.9"
7
+ version = "1.0.12"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -19,6 +19,7 @@ classifiers = [
19
19
  ]
20
20
  dependencies = [
21
21
  "rda_python_common",
22
+ "rda_python_setuid",
22
23
  ]
23
24
 
24
25
  [tool.setuptools]
@@ -28,7 +29,7 @@ include-package-data = true
28
29
  where = ["src"]
29
30
 
30
31
  [tool.setuptools.package-data]
31
- "rda_python_dsarch" = ["dsarch.usg", "dsarch.c"]
32
+ "rda_python_dsarch" = ["dsarch.usg"]
32
33
 
33
34
  [project.urls]
34
35
  "Homepage" = "https://github.com/NCAR/rda-python-dsarch"
@@ -42,7 +42,7 @@ ERRMSG = ''
42
42
  def main():
43
43
 
44
44
  pgname = "dsarch"
45
- PgLOG.PGLOG['PUSGDIR'] = op.dirname(op.abspath(__file__))
45
+ PgLOG.set_help_path(__file__)
46
46
  PgOPT.parsing_input(pgname)
47
47
  PgLOG.set_suid(PgLOG.PGLOG['EUID'] if PgOPT.OPTS[PgOPT.PGOPT['CACT']][2] > 0 else PgLOG.PGLOG['RUID'])
48
48
 
@@ -2491,7 +2491,7 @@ def set_for_internal_group(gindex):
2491
2491
  gcnd = "gindex = {} AND status = 'P'".format(gindex)
2492
2492
  cnd = "{} AND {}".format(dcnd, gcnd)
2493
2493
 
2494
- pgrecs = PgSplit.pgget_wfile(dsid, 'wfile, type', gcnd, PgOPT.PGOPT['extlog'])
2494
+ pgrecs = PgSplit.pgmget_wfile(dsid, 'wfile, type', gcnd, PgOPT.PGOPT['extlog'])
2495
2495
  cnt = len(pgrecs['wfile']) if pgrecs else 0
2496
2496
  srec = {'status' : 'I'}
2497
2497
  if cnt:
@@ -2840,7 +2840,7 @@ def set_one_webfile(i, pgrec, file, flds, type, info = None, ndsid = None, sact
2840
2840
  record = PgOPT.build_record(flds, pgrec, tname, i)
2841
2841
  if pgrec and (pgrec['status'] == 'D' or PgOPT.PGOPT['ACTS']&PgOPT.OPTS['AW'][0]):
2842
2842
  record['uid'] = PgOPT.PGOPT['UID']
2843
- if not info:
2843
+ if not (info and info['date_modified']):
2844
2844
  info = PgFile.check_local_file(PgArch.get_web_path(i, file, 1, type),
2845
2845
  1, PgOPT.PGOPT['emerol'])
2846
2846
  if info:
@@ -2992,7 +2992,7 @@ def set_one_helpfile(i, pgrec, file, flds, type, info = None, ndsid = None):
2992
2992
  record = PgOPT.build_record(flds, pgrec, tname, i)
2993
2993
  if pgrec and (pgrec['status'] == 'D' or PgOPT.PGOPT['ACTS']&PgOPT.OPTS['AH'][0]):
2994
2994
  record['uid'] = PgOPT.PGOPT['UID']
2995
- if not info:
2995
+ if not (info and info['date_modified']):
2996
2996
  info = PgFile.check_local_file(PgArch.get_help_path(i, file, 1, type), 1, PgOPT.PGOPT['emerol'])
2997
2997
  if info:
2998
2998
  record['data_size'] = info['data_size']
@@ -3161,7 +3161,7 @@ def set_one_savedfile(i, pgrec, file, flds, type, info = None, ndsid = None, sac
3161
3161
  record = PgOPT.build_record(flds, pgrec, tname, i)
3162
3162
  if pgrec and PgOPT.PGOPT['ACTS']&PgOPT.OPTS['AS'][0]:
3163
3163
  record['uid'] = PgOPT.PGOPT['UID']
3164
- if not info:
3164
+ if not (info and info['date_modified']):
3165
3165
  info = PgFile.check_local_file(PgArch.get_saved_path(i, file, 1, type), 1, PgOPT.PGOPT['emerol'])
3166
3166
  if info:
3167
3167
  record['data_size'] = info['data_size']
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.9
3
+ Version: 1.0.12
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
@@ -12,5 +12,7 @@ Requires-Python: >=3.7
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: rda_python_common
15
+ Requires-Dist: rda_python_setuid
16
+ Dynamic: license-file
15
17
 
16
18
  RDA python Package to archive and maintain RDA datasets.
@@ -5,7 +5,6 @@ pyproject.toml
5
5
  src/rda_python_dsarch/PgArch.py
6
6
  src/rda_python_dsarch/PgMeta.py
7
7
  src/rda_python_dsarch/__init__.py
8
- src/rda_python_dsarch/dsarch.c
9
8
  src/rda_python_dsarch/dsarch.py
10
9
  src/rda_python_dsarch/dsarch.usg
11
10
  src/rda_python_dsarch.egg-info/PKG-INFO
@@ -1,41 +0,0 @@
1
- /***************************************************************************************\
2
- *
3
- * Title: dsarch.c
4
- * Author: Zaihua Ji, zji@ucar.edu
5
- * Date: 2024-01-30
6
- * Purpose: C wrapper to setuid for a common effective user to
7
- * run dsarch python scripts
8
- *
9
- * Instruction:
10
- * after python -m pip install rda_python_dsarch
11
- * cd $ENVHOME/lib/python3.*/site-packages/rda_python_dsarch/
12
- * cp dsarch.c $ENVHOME/bin/
13
- * cd $ENVHOME/bin/
14
- * sudo -u CommonUser gcc -o dsarch $ENVHOME/bin/dsarch.c
15
- * sudo -u CommonUser chmod 4750 dsarch
16
- *
17
- * *: python 3 release number, for example n = 10 in Python 3.10.12
18
- * CommonUser: rdadata, for RDAMS configuration
19
- * $ENVHOME: /glade/u/home/rdadata/rdamsenv (venv) on DECS machines, and
20
- * /glade/work/rdadata/conda-envs/pg-rda (conda) on DAV;
21
- *
22
- \***************************************************************************************/
23
-
24
- #include <sys/types.h>
25
- #include <unistd.h>
26
- #include <stdio.h>
27
- #include <stdlib.h>
28
- #include <string.h>
29
- #include <libgen.h>
30
-
31
- /* main program */
32
- int main(int argc, char *argv[]) {
33
- char prog[128];
34
- char file[] = __FILE__;
35
-
36
- strcpy(prog, dirname(file));
37
- strcat(prog, "/dsarch.py");
38
-
39
- /* call Python script */
40
- execv(prog, argv);
41
- }