[opensuse-packaging] What do I do with .pyc files?
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them. Thanks for any help. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
On 04/11/2010 08:36 AM, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them. Thanks for any help. Regards Dave P
Now I have an even greater dilemma, I've researched compiling python files and tried from the command line and the resulting files all contain references to the build root directory. These .pyc files are most probably necessary to correct operation of solfege which is a good package but unfortunately openSUSE 11.3 is most probably going to have quite an old version due to this. If anyone wants to look I've got it in home:plater solfege and will test it with an rrpmlintrc file. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/52505bac1e0f5b3052ed89f63d10292d.jpg?s=120&d=mm&r=g)
On 2010-04-11 14:49:14 +0200, Dave Plater wrote:
On 04/11/2010 08:36 AM, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them. Thanks for any help. Regards Dave P
Now I have an even greater dilemma, I've researched compiling python files and tried from the command line and the resulting files all contain references to the build root directory. These .pyc files are most probably necessary to correct operation of solfege which is a good package but unfortunately openSUSE 11.3 is most probably going to have quite an old version due to this. If anyone wants to look I've got it in home:plater solfege and will test it with an rrpmlintrc file. Thanks
in worst case just delete them. that will make startup time a bit slower but nothing breaks. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
On 04/11/2010 02:53 PM, Marcus Rueckert wrote:
On 2010-04-11 14:49:14 +0200, Dave Plater wrote:
On 04/11/2010 08:36 AM, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them. Thanks for any help. Regards Dave P
Now I have an even greater dilemma, I've researched compiling python files and tried from the command line and the resulting files all contain references to the build root directory. These .pyc files are most probably necessary to correct operation of solfege which is a good package but unfortunately openSUSE 11.3 is most probably going to have quite an old version due to this. If anyone wants to look I've got it in home:plater solfege and will test it with an rrpmlintrc file. Thanks
in worst case just delete them. that will make startup time a bit slower but nothing breaks.
darix
Interesting thing is rpmlint doesn't complain about the 11.2 build but does for all the others, although when I use rpmbuild in 11.2 the pyc files all contain the build root paths the same as the factory build ones. Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/5b19e9d0e834ea10ef75803718ad564b.jpg?s=120&d=mm&r=g)
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1... Takashi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/5b19e9d0e834ea10ef75803718ad564b.jpg?s=120&d=mm&r=g)
At Mon, 12 Apr 2010 09:54:59 +0200, I wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Or. a better patch would be something like below. Takashi --- --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/Makefile.in +++ b/Makefile.in @@ -142,7 +142,7 @@ compileall: ifneq (x"$(nopycompile)",xYES) - $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(datadir)/$(PACKAGE)/solfege')" + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(datadir)/$(PACKAGE)/solfege',10,'$(datadir)/$(PACKAGE)/solfege')" endif mkinstalldirs: -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
On 04/12/2010 10:04 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 09:54:59 +0200, I wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Or. a better patch would be something like below.
Takashi
--- --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile.in +++ b/Makefile.in @@ -142,7 +142,7 @@
compileall: ifneq (x"$(nopycompile)",xYES) - $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(datadir)/$(PACKAGE)/solfege')" + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)$(datadir)/$(PACKAGE)/solfege',10,'$(datadir)/$(PACKAGE)/solfege')" endif
mkinstalldirs:
I made the above patch into solfege-python-nocompile.patch but the build service is down ATM. I've revoked the sr to factory already. Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
On 04/12/2010 09:54 AM, Takashi Iwai wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Takashi
I removed solfege-compile-all-fix.diff because all the changes in it where already in Makefile.in. I've tested solfege a bit with the pyc files deleted and it seems to work, if they do cause a bug it's a simple matter to not delete them on build. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/5b19e9d0e834ea10ef75803718ad564b.jpg?s=120&d=mm&r=g)
At Mon, 12 Apr 2010 10:19:11 +0200, Dave Plater wrote:
On 04/12/2010 09:54 AM, Takashi Iwai wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Takashi
I removed solfege-compile-all-fix.diff because all the changes in it where already in Makefile.in.
It's obviously not :)
I've tested solfege a bit with the pyc files deleted and it seems to work, if they do cause a bug it's a simple matter to not delete them on build.
This can be controlled even via passing nopycompile=YES at make installation time. Takashi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
On 04/12/2010 10:32 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 10:19:11 +0200, Dave Plater wrote:
On 04/12/2010 09:54 AM, Takashi Iwai wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Takashi
I removed solfege-compile-all-fix.diff because all the changes in it where already in Makefile.in.
It's obviously not :)
I've tested solfege a bit with the pyc files deleted and it seems to work, if they do cause a bug it's a simple matter to not delete them on build.
This can be controlled even via passing nopycompile=YES at make installation time.
Takashi
I'll try the patch but a simple "find $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}/ -name *pyc -delete" in the spec file also does the job. I was looking at the "ifneq (x"$(nopycompile)",xYES)" line in the makefile, obviously there must be something that can be passed at build time? Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/5b19e9d0e834ea10ef75803718ad564b.jpg?s=120&d=mm&r=g)
At Mon, 12 Apr 2010 10:49:43 +0200, Dave Plater wrote:
On 04/12/2010 10:32 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 10:19:11 +0200, Dave Plater wrote:
On 04/12/2010 09:54 AM, Takashi Iwai wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Takashi
I removed solfege-compile-all-fix.diff because all the changes in it where already in Makefile.in.
It's obviously not :)
I've tested solfege a bit with the pyc files deleted and it seems to work, if they do cause a bug it's a simple matter to not delete them on build.
This can be controlled even via passing nopycompile=YES at make installation time.
Takashi
I'll try the patch but a simple "find $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}/ -name *pyc -delete" in the spec file also does the job.
But not the same job.
I was looking at the "ifneq (x"$(nopycompile)",xYES)" line in the makefile, obviously there must be something that can be passed at build time?
No. It's used only there, so it's an installation-only thing. Takashi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/5b19e9d0e834ea10ef75803718ad564b.jpg?s=120&d=mm&r=g)
At Mon, 12 Apr 2010 10:58:05 +0200, I wrote:
At Mon, 12 Apr 2010 10:49:43 +0200, Dave Plater wrote:
On 04/12/2010 10:32 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 10:19:11 +0200, Dave Plater wrote:
On 04/12/2010 09:54 AM, Takashi Iwai wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
Hi, I'm updating multimedia:apps solfege and the new version produces a lot of .pyc files on make install which contain text which refers to the path that the file was installed in :- /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ This causes lot's of rpmlint errors ie. ;- solfege.x86_64: E: file-contains-buildroot (Badness: 10000) /usr/share/solfege/solfege/cfg.pyc I understand these files to be compiled python but being a complete novice with python I don't know what to do with them.
You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Takashi
I removed solfege-compile-all-fix.diff because all the changes in it where already in Makefile.in.
It's obviously not :)
I've tested solfege a bit with the pyc files deleted and it seems to work, if they do cause a bug it's a simple matter to not delete them on build.
This can be controlled even via passing nopycompile=YES at make installation time.
Takashi
I'll try the patch but a simple "find $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}/ -name *pyc -delete" in the spec file also does the job.
But not the same job.
To clarify: the patch fixes the bug in Makefile for wrong paths in *.pyc with $(DESTDIR). Deleting *.pyc is a workaround but it slows down the program start up, too, as darix mentioned. Takashi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
On 04/12/2010 11:02 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 10:58:05 +0200, I wrote:
At Mon, 12 Apr 2010 10:49:43 +0200, Dave Plater wrote:
On 04/12/2010 10:32 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 10:19:11 +0200, Dave Plater wrote:
On 04/12/2010 09:54 AM, Takashi Iwai wrote:
At Sun, 11 Apr 2010 08:36:58 +0200, Dave Plater wrote:
> Hi, I'm updating multimedia:apps solfege and the new version produces a > lot of .pyc files on make install which contain text which refers to the > path that the file was installed in :- > /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ > This causes lot's of rpmlint errors ie. ;- > solfege.x86_64: E: file-contains-buildroot (Badness: 10000) > /usr/share/solfege/solfege/cfg.pyc > I understand these files to be compiled python but being a complete > novice with python I don't know what to do with them. > > You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or FACTORY solfege package for Makefile of solfege-3.16.1...
Takashi
I removed solfege-compile-all-fix.diff because all the changes in it where already in Makefile.in.
It's obviously not :)
I've tested solfege a bit with the pyc files deleted and it seems to work, if they do cause a bug it's a simple matter to not delete them on build.
This can be controlled even via passing nopycompile=YES at make installation time.
Takashi
I'll try the patch but a simple "find $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}/ -name *pyc -delete" in the spec file also does the job.
But not the same job.
To clarify: the patch fixes the bug in Makefile for wrong paths in *.pyc with $(DESTDIR).
Deleting *.pyc is a workaround but it slows down the program start up, too, as darix mentioned.
Takashi
I used rpmbuild -bi on solfege with the patch applied but it still builds the offending .pyc files but on examination they only contain installed paths not build root ones, I'll test it when the build service api server works again. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b1a0edc535182bc18779eac72052bd7a.jpg?s=120&d=mm&r=g)
On 04/12/2010 11:09 AM, Dave Plater wrote:
On 04/12/2010 11:02 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 10:58:05 +0200, I wrote:
At Mon, 12 Apr 2010 10:49:43 +0200, Dave Plater wrote:
On 04/12/2010 10:32 AM, Takashi Iwai wrote:
At Mon, 12 Apr 2010 10:19:11 +0200, Dave Plater wrote:
On 04/12/2010 09:54 AM, Takashi Iwai wrote:
> At Sun, 11 Apr 2010 08:36:58 +0200, > Dave Plater wrote: > > > >> Hi, I'm updating multimedia:apps solfege and the new version produces a >> lot of .pyc files on make install which contain text which refers to the >> path that the file was installed in :- >> /usr/src/packages/BUILDROOT/solfege-3.16.1-1.x86_64//usr/share/solfege/solfege/ >> This causes lot's of rpmlint errors ie. ;- >> solfege.x86_64: E: file-contains-buildroot (Badness: 10000) >> /usr/share/solfege/solfege/cfg.pyc >> I understand these files to be compiled python but being a complete >> novice with python I don't know what to do with them. >> >> >> > You'd need to refresh the patch solfege-compile-all-fix.diff in m:l or > FACTORY solfege package for Makefile of solfege-3.16.1... > > > Takashi > > > I removed solfege-compile-all-fix.diff because all the changes in it where already in Makefile.in.
It's obviously not :)
I've tested solfege a bit with the pyc files deleted and it seems to work, if they do cause a bug it's a simple matter to not delete them on build.
This can be controlled even via passing nopycompile=YES at make installation time.
Takashi
I'll try the patch but a simple "find $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}/ -name *pyc -delete" in the spec file also does the job.
But not the same job.
To clarify: the patch fixes the bug in Makefile for wrong paths in *.pyc with $(DESTDIR).
Deleting *.pyc is a workaround but it slows down the program start up, too, as darix mentioned.
Takashi
I used rpmbuild -bi on solfege with the patch applied but it still builds the offending .pyc files but on examination they only contain installed paths not build root ones, I'll test it when the build service api server works again. Thanks Dave P
Patch works :-) thanks. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Dave Plater
-
Marcus Rueckert
-
Takashi Iwai