Could you please tell me what the setup.py should look like to create a folder structure, for example if I have this:
../MyProgram
COPYING
README
mainscript.pyw
/applications
/app1
/icons
pic1.png
app1.py
/app2
/icons
pic2.png
/scripts
script1.py
script2.py
app2.py
etc.
I read the Python Docs, played with ‘package_dir’, ‘packages’ but the OBS still gives me errors it can’t find the icon files. I guess the setup script doesn’t create them. And when I tried to build an rpm locally, it gave me the same error. When I looked in the BUILD folder, there was no folder ‘applications’ created and nothing below it.
Will really appreciate your help. Please provide an example. Thank you.
Hi,
perhaps you’d better ask this question in the OBS forum, not the programming/scripting one?
HTH
Lenwolf
Anyone? I’ve asked on the OBS forum but no one replied. Please help, my project doesn’t build.
Hi
The question is where do you want the files to reside in the system, for example for files to reside in /usr/bin (%{_bindir}) you need to define in;
setup(
scripts = 'app1','app2']
)
The all the rest are in data files, where ever they are in your source structure and where you want them, eg;
data_files =
('/the/final_file/location', 'your/sourcelocation/filename' ] ),
('/usr/share/pixmaps/', listfiles( 'images', "*" ) ),
]
the images is a directory, the * is all files and it will install in /usr/share/pixmaps, so normally you would install in /usr/share (%{_datadir}) then would append your app name after the /usr/share
Thank you, malcolmlewis.
All I want is to install the program start shell script in /usr/bin and this whole exact project structure in /usr/share/MyProgram
COPYING
README
mainscript.pyw
/applications
/app1
/icons
pic1.png
app1.py
/app2
/icons
pic2.png
/scripts
script1.py
script2.py
app2.py
Can I install the whole lot (I mean my whole Python project) as data files and add the shell script? The problem is only file in the main project folder install (e.g. mainscript.pyw) + data files, but none of the other python folders (e.g. /app1/scripts/script1.py) with scripts install.