Skip to content
This repository was archived by the owner on Mar 4, 2021. It is now read-only.

Commit 74ad18c

Browse files
author
Dominik Neise
authored
Merge pull request #22 from cta-sst-1m/working_on_v0.44.2
Working on v0.44.2
2 parents fc21fbf + 7fdbf4e commit 74ad18c

3 files changed

Lines changed: 69 additions & 62 deletions

File tree

README.md

Lines changed: 23 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,25 @@
11
# Protozftisreader [![Build Status](https://travis-ci.org/cta-sst-1m/protozfitsreader.svg?branch=master)](https://travis-ci.org/cta-sst-1m/protozfitsreader)
22

3-
## installation:
3+
## Installation:
44

55
We all use [Anaconda](https://www.anaconda.com/) and this package is tested
66
against Anaconda. You can [download anaconda](https://www.anaconda.com/download) for your system for free.
77

88
You do not have to use a [conda environment](https://conda.io/docs/user-guide/tasks/manage-environments.html) to use this package. It cleanly installs and uninstalls with [pip](https://docs.python.org/3.6/installing/). If you plan to play around with different versions of this package your might want to use environments though.
99

10-
### Faster installation?
11-
12-
If you use Anaconda this is not interesting for you.
13-
14-
You can just `pip install` this, but it will use `pip` to install all the dependencies.
15-
`pip install <some package>` is sometimes much slower than `conda install <some package>`.
16-
17-
If you use "miniconda" or if you install this in a fresh conda environment, then
18-
numpy and protobuf might not be there, so we recommend to
19-
20-
conda install numpy protobuf
21-
22-
for your convenience.
23-
2410
### Linux (with anaconda)
2511

26-
pip install https://github.com/cta-sst-1m/protozfitsreader/archive/v0.44.1.tar.gz
12+
pip install https://github.com/cta-sst-1m/protozfitsreader/archive/v0.44.2.tar.gz
2713

2814
### OSX (with anaconda)
2915

30-
pip install https://github.com/cta-sst-1m/protozfitsreader/archive/v0.44.1.tar.gz
16+
pip install https://github.com/cta-sst-1m/protozfitsreader/archive/v0.44.2.tar.gz
3117

3218
To use it you'll have to find your `site-packages` folder, e.g. like this:
3319

3420
dneise@lair:~$ python -m site
3521
sys.path = [
3622
'/home/dneise',
37-
'/home/dneise/Downloads/rootfoo/build_root/lib',
3823
'/home/dneise/anaconda3/lib/python36.zip',
3924
'/home/dneise/anaconda3/lib/python3.6',
4025
'/home/dneise/anaconda3/lib/python3.6/lib-dynload',
@@ -45,6 +30,21 @@ And then you'll have to (put it in your .bashrc for example)
4530

4631
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/home/dneise/anaconda3/lib/python3.6/site-packages
4732

33+
### Miniconda & Faster installation?
34+
35+
If you use **Ana**conda this is not interesting for you, but if you use **Mini**conda,
36+
then please read on.
37+
38+
You could just `pip install` this and it would use `pip` to install all the dependencies.
39+
But `pip install <some package>` is sometimes much slower than `conda install <some package>`.
40+
41+
Two of the requirements of this package are `numpy` and `protobuf`.
42+
We think installing them with `pip` is very slow, so we recommend to
43+
44+
conda install numpy protobuf
45+
46+
before `pip`-installing this package for your convenience.
47+
4848
### To developers: No `pip --editable`
4949

5050
This package contains pre-build binaries, which (at the moment) are required to be installed
@@ -69,49 +69,11 @@ I personally do:
6969
The uninstall/install takes 1..2sec ... so it is rather ok... not perfect though.
7070

7171

72+
## Where does this come from?
7273

73-
# Where does this come from?
74-
75-
The contents of this repo come entirely from: http://www.isdc.unige.ch/~lyard/repo/
76-
77-
## Modifications with respect to http://www.isdc.unige.ch/~lyard/repo/
78-
79-
1. setup.py:
80-
81-
I just updated the setup.py a little to use setuptools instead of
82-
distutils. The result is that all `*.py` and `*.so` files of this package are
83-
installed into a folder called "protozfitsreader" inside the "site-packages",
84-
before the files were directly copied into "site-packages" which worked as
85-
well, but was a little untidy.
86-
87-
2. relative imports
88-
89-
As a result, I had to modify some `import` statement, they were written as
90-
absolute imports, but now we do relative imports from the "protozfitsreader"
91-
package.
92-
93-
94-
3. set RPATH
95-
96-
The main purpose of this was, to deliver "patched" so-files. The so-files
97-
in the original tar-ball contain absolute RPATHs, which prevent the linker from
98-
finding the dependencies. Here I simply patched the so-files and added relative
99-
RPATH like this:
74+
The contents of this repo are based tar-balls thankfully generated by E. Lyard.
75+
The [difference is explained](patching_so_files.md) on a seprate page.
10076

101-
```
102-
for i in *.so; do patchelf --set-rpath '$ORIGIN' $i; done
103-
for i in raw*.so; do patchelf --set-rpath '$ORIGIN:$ORIGIN/../../../' $i; done
104-
for i in *.so; do echo $i; patchelf --print-rpath $i; done
105-
```
77+
## Usage example:
10678

107-
gives:
108-
```
109-
libACTLCore.so
110-
$ORIGIN
111-
libZFitsIO.so
112-
$ORIGIN
113-
rawzfitsreader.cpython-35m-x86_64-linux-gnu.so
114-
$ORIGIN:$ORIGIN/../../../
115-
rawzfitsreader.cpython-36m-x86_64-linux-gnu.so
116-
$ORIGIN:$ORIGIN/../../../
117-
```
79+
... to come soon.

patching_so_files.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Where does this come from?
2+
3+
The contents of this repo come entirely from: http://www.isdc.unige.ch/~lyard/repo/
4+
5+
## Modifications with respect to http://www.isdc.unige.ch/~lyard/repo/
6+
7+
1. setup.py:
8+
9+
I just updated the setup.py a little to use setuptools instead of
10+
distutils. The result is that all `*.py` and `*.so` files of this package are
11+
installed into a folder called "protozfitsreader" inside the "site-packages",
12+
before the files were directly copied into "site-packages" which worked as
13+
well, but was a little untidy.
14+
15+
2. relative imports
16+
17+
As a result, I had to modify some `import` statement, they were written as
18+
absolute imports, but now we do relative imports from the "protozfitsreader"
19+
package.
20+
21+
22+
3. set RPATH
23+
24+
The main purpose of this was, to deliver "patched" so-files. The so-files
25+
in the original tar-ball contain absolute RPATHs, which prevent the linker from
26+
finding the dependencies. Here I simply patched the so-files and added relative
27+
RPATH like this:
28+
29+
```
30+
for i in *.so; do patchelf --set-rpath '$ORIGIN' $i; done
31+
for i in raw*.so; do patchelf --set-rpath '$ORIGIN:$ORIGIN/../../../' $i; done
32+
for i in *.so; do echo $i; patchelf --print-rpath $i; done
33+
```
34+
35+
gives:
36+
```
37+
libACTLCore.so
38+
$ORIGIN
39+
libZFitsIO.so
40+
$ORIGIN
41+
rawzfitsreader.cpython-35m-x86_64-linux-gnu.so
42+
$ORIGIN:$ORIGIN/../../../
43+
rawzfitsreader.cpython-36m-x86_64-linux-gnu.so
44+
$ORIGIN:$ORIGIN/../../../
45+
```

protozfitsreader/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.44.1
1+
0.44.2

0 commit comments

Comments
 (0)