Comments (9)
Hi @gaede, apologies for that, I'll get a fix Pull Request prepared.
from podio.
Having had a quick look at this, there are a several ways to resolve this so thought better to discuss here before fixing in a Pull Request:
-
Restore original behaviour, so the install tree would look like:
+- CMAKE_INSTALL_PREFIX/ +- python/ +- templates/
The simplest, but will cause problems for packagers - e.g. say the install prefix is
/usr/local
, then/usr/local/templates
is non-standard and could easily clash (I'm ignoring thepython dir
for now!). -
Move
templates
as a subdirectory ofpython
, so the relative path becomes "./templates". This is probably the best solution if the template files aren't for general access/use, i.e. only podio's python code will read them. -
Update the relative path on install using known install locations to construct a relative path.
I'll implement whatever solution is preferred for podio. My personal recommendation would be the second one if the template files are only intended for internal use by podio's class generation.
from podio.
Hi @drbenmorgan, I'd also vote for option 2). Can't think of any other use cases for the templates than from our python generators.
from podio.
PS: shouldn't the INSTALL_DIR/python
have a podio
subdirectory in case someone wants to install to /usr/local/
?
from podio.
Thanks @gaede, I'll go ahead and implement 2).
You're right on the INSTALL_DIR/python
issue, but python/podio
also seems odd. Looking at the files in python/
, there are some programs and modules
- programs:
podio_class_generator.py
,podio_create_package.py
- modules:
podio_config_reader.py
,podio_templates.py
,EventStore.py
The former should probably go under a bin/
subdirectory, but am not sure about the latter. I'd guess lib/pythonX.Y/site-packages/podio
. Maybe just install them all to bin
for now?
from podio.
Ah scratch that install to bin
, since that would stick templates
under that which wouldn't be good.
from podio.
How about having sth like:
/usr/local/include
/usr/local/lib
/usr/local/podio
/usr/local/podio/python
/usr/local/podio/templates
/usr/local/podio/...
Then we could easily add whatever is needed to /usr/local/podio/
?
from podio.
I've submitted a Pull Request to fix the main issue using the 2nd option. Long term, it's probably best to think about a structure like:
+- bin/
+- podio_class_generator
+- include/
+- podio/
+- lib/
+- libpodio.so
+- ...dict...
+- cmake/
+- pythonX.Y/
+- site-packages/
+- podio/
+- EventStore.py ?
+- podio_config_reader.py ?
...
That would require a little more work though, so thought best to submit the PR to get the fix in directly for now!
from podio.
from podio.
Related Issues (20)
- discussion: Possibility of differing in-memory and on-file datatypes HOT 1
- Add tests for JSON output
- Trivial return types of generated get methods should be by value instead of const reference
- Switch to black for formatting python sources HOT 1
- how to retrieve the cell ID encoding from the metadata in the output ROOT file HOT 2
- RNTuple interface changed in ROOT HOT 1
- collection push_back and value_type incompatible with some std iterator adaptors HOT 1
- Inconsistent reference access for Mutable types
- Schema evolution script does not flag some evolutions as impossible
- Frame serialization/deserialization HOT 12
- Automatically ship collection level metadata
- GenericParameters should not return a default constructed / empty value if key is not present HOT 4
- Warnings when generating ROOT dictionaries HOT 1
- GenericParameters should be stored the same way for TTree and RNTuple backends HOT 6
- Leak in SIO Frame reading
- Document the cmake functionality HOT 4
- Use types of heterogeneous origins in interfaces HOT 3
- Document more advanced cmake usage
- Make it possible to store more version information of generated EDMs
- OneToOne relations are not preserved on `clone()` since v01-00 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podio.