rda-python-dsarch 1.0.2__tar.gz → 1.0.4__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.4/MANIFEST.in +2 -0
  2. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/PKG-INFO +1 -1
  3. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/pyproject.toml +2 -2
  4. rda_python_dsarch-1.0.4/src/rda_python_dsarch/dsarch.c +48 -0
  5. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch.egg-info/PKG-INFO +1 -1
  6. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch.egg-info/SOURCES.txt +1 -0
  7. rda_python_dsarch-1.0.2/MANIFEST.in +0 -1
  8. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/LICENSE +0 -0
  9. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/README.md +0 -0
  10. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/setup.cfg +0 -0
  11. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch/PgArch.py +0 -0
  12. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch/PgMeta.py +0 -0
  13. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch/__init__.py +0 -0
  14. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch/dsarch.py +0 -0
  15. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch/dsarch.usg +0 -0
  16. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch.egg-info/dependency_links.txt +0 -0
  17. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch.egg-info/entry_points.txt +0 -0
  18. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/src/rda_python_dsarch.egg-info/top_level.txt +0 -0
  19. {rda_python_dsarch-1.0.2 → rda_python_dsarch-1.0.4}/tests/test_dsarch.py +0 -0
@@ -0,0 +1,2 @@
1
+ include src/rda_python_dsarch/dsarch.usg
2
+ include src/rda_python_dsarch/dsarch.c
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.2
3
+ Version: 1.0.4
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
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
 
8
8
  [project]
9
9
  name = "rda_python_dsarch"
10
- version = "1.0.2"
10
+ version = "1.0.4"
11
11
  authors = [
12
12
  { name="Zaihua Ji", email="zji@ucar.edu" },
13
13
  ]
@@ -28,7 +28,7 @@ include-package-data = true
28
28
  where = ["src"]
29
29
 
30
30
  [tool.setuptools.package-data]
31
- "rda_pyhton_dsarch" = ["dsarch.usg"]
31
+ "rda_pyhton_dsarch" = ["dsarch.usg", "dsarch.c"]
32
32
 
33
33
  [project.urls]
34
34
  "Homepage" = "https://github.com/NCAR/rda-python-dsarch"
@@ -0,0 +1,48 @@
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 dsarch python scripts
7
+ *
8
+ * Instruction:
9
+ *
10
+ * dsarch.c $LOCHOME/bin/dsarch.c
11
+ * cd $LOCHOME/bin/
12
+ * gcc -o dsarch dsarch.c
13
+ * chmod 4750 dsarch
14
+ *
15
+ * $LOCHOME: /usr/local/decs On DECS machines, and /ncar/rda/setuid on DAV
16
+ * $ENVHOME: /glade/u/home/rdadata/rdamsenv on DECS machines, and
17
+ * /glade/work/zji/conda-envs/pg-rda on DAV
18
+ *
19
+ \***************************************************************************************/
20
+
21
+ #include <sys/types.h>
22
+ #include <unistd.h>
23
+ #include <stdio.h>
24
+ #include <stdlib.h>
25
+ #include <string.h>
26
+
27
+ /* main program */
28
+ int main(int argc, char *argv[]) {
29
+ char *name;
30
+ char prog[128];
31
+ char pext[] = ".py";
32
+
33
+ strcpy(prog, getenv("ENVHOME"));
34
+ strcat(prog, "/bin/");
35
+ name = strrchr(argv[0], '/');
36
+ if(name == (char *)NULL) {
37
+ strcat(prog, argv[0]);
38
+ } else {
39
+ strcat(prog, ++name);
40
+ }
41
+ name = strrchr(prog, '.');
42
+ if(name == (char *)NULL || strcmp(name, pext) != 0) {
43
+ strcat(prog, pext);
44
+ }
45
+
46
+ /* call Python script */
47
+ execv(prog, argv);
48
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.2
3
+ Version: 1.0.4
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
@@ -5,6 +5,7 @@ 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
8
9
  src/rda_python_dsarch/dsarch.py
9
10
  src/rda_python_dsarch/dsarch.usg
10
11
  src/rda_python_dsarch.egg-info/PKG-INFO
@@ -1 +0,0 @@
1
- include src/rda_python_dsarch/dsarch.usg