Discussion:
compiling soya from svn or 0.15
Fabio Varesano
2011-06-13 12:35:23 UTC
Permalink
Hi everyone,

I just got the most recent release of Soya3d from the svn repository,
but I'm having troubles compiling it...

[***@gamma soya]$ python2 ./setup.py build
Pyrex found - compilation enabled
BUILDING True
Sound support (with OpenAL) enabled...
Traceback (most recent call last):
File "./setup.py", line 245, in <module>
soya_pyx_mtime=os.path.getmtime('soya._soya.pyx')
File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 'soya._soya.pyx'


Same result if running as root. Any help?

I'm also having troubles compiling 0.15rc1:

[***@gamma Soya-0.15rc1]# python2 ./setup.py build
Pyrex compilation enabled!
BUILDING True
Sound support (with OpenAL) enabled...
running build
running build_py
running build_ext
pyrexc _soya.pyx --> _soya.c
Traceback (most recent call last):
File "./setup.py", line 318, in <module>
**KARGS)
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 340,
in run
self.build_extensions()
File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
81, in build_extensions
ext.sources = self.pyrex_sources(ext.sources, ext)
File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
188, in pyrex_sources
result = pyrex_compile(source, options=options)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
504, in compile
return compile_single(source, options)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
453, in compile_single
return context.compile(source, options)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
326, in compile
module_name = self.extract_module_name(source)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
241, in extract_module_name
"'%s' is not a valid module name" % module_name)
Pyrex.Compiler.Errors.CompileError:
/home/fabio/Programs/soya/Soya-0.15rc1/_soya.pyx:0:0:
'Soya-0.15rc1._soya' is not a valid module name


I'm using an updated Archlinux distribution, so I'm using the most
recent packages available, maybe this is a problem of using newer
versions of Soya requirements?

Ideas?

Thanks,

Fabio
deavid
2011-06-13 12:42:34 UTC
Permalink
Hi, soya has one or two bugs in the compilation system on the latest
changes of SVN.

The last valid commit is:

bug fix for cython compilation

svn-id: svn://svn.gna.org/svn/soya/***@550
f7f35755-3713-0410-b059-dae289c688fa

But i have a mirror of Soya's SVN in git here:
https://github.com/deavid/soyamirror

git clone git://github.com/deavid/soyamirror.git
git checkout -b deavid origin/deavid

----

My local branch has changes that should be introduced in Ubuntu and
other Linux OS in order to get Soya's running.

Hope this helps you.
Post by Fabio Varesano
Hi everyone,
I just got the most recent release of Soya3d from the svn repository,
but I'm having troubles compiling it...
Pyrex found - compilation enabled
BUILDING True
Sound support (with OpenAL) enabled...
 File "./setup.py", line 245, in <module>
   soya_pyx_mtime=os.path.getmtime('soya._soya.pyx')
 File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
   return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 'soya._soya.pyx'
Same result if running as root. Any help?
Pyrex compilation enabled!
BUILDING True
Sound support (with OpenAL) enabled...
running build
running build_py
running build_ext
pyrexc _soya.pyx --> _soya.c
 File "./setup.py", line 318, in <module>
   **KARGS)
 File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
   dist.run_commands()
 File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
   self.run_command(cmd)
 File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
   cmd_obj.run()
 File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
   self.run_command(cmd_name)
 File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
   self.distribution.run_command(command)
 File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
   cmd_obj.run()
 File "/usr/lib/python2.7/distutils/command/build_ext.py", line 340,
in run
   self.build_extensions()
 File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
81, in build_extensions
   ext.sources = self.pyrex_sources(ext.sources, ext)
 File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
188, in pyrex_sources
   result = pyrex_compile(source, options=options)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
504, in compile
   return compile_single(source, options)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
453, in compile_single
   return context.compile(source, options)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
326, in compile
   module_name = self.extract_module_name(source)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
241, in extract_module_name
   "'%s' is not a valid module name" % module_name)
'Soya-0.15rc1._soya' is not a valid module name
I'm using an updated Archlinux distribution, so I'm using the most
recent packages available, maybe this is a problem of using newer
versions of Soya requirements?
Ideas?
Thanks,
Fabio
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
Fabio Varesano
2011-06-13 12:58:00 UTC
Permalink
Thank you deavid! I cloned your branch and I've been to successfully
compile and run soya on my system!

Thank you,

Fabio
Post by deavid
Hi, soya has one or two bugs in the compilation system on the latest
changes of SVN.
bug fix for cython compilation
f7f35755-3713-0410-b059-dae289c688fa
https://github.com/deavid/soyamirror
git clone git://github.com/deavid/soyamirror.git
git checkout -b deavid origin/deavid
----
My local branch has changes that should be introduced in Ubuntu and
other Linux OS in order to get Soya's running.
Hope this helps you.
Post by Fabio Varesano
Hi everyone,
I just got the most recent release of Soya3d from the svn repository,
but I'm having troubles compiling it...
Pyrex found - compilation enabled
BUILDING True
Sound support (with OpenAL) enabled...
File "./setup.py", line 245, in <module>
soya_pyx_mtime=os.path.getmtime('soya._soya.pyx')
File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 'soya._soya.pyx'
Same result if running as root. Any help?
Pyrex compilation enabled!
BUILDING True
Sound support (with OpenAL) enabled...
running build
running build_py
running build_ext
pyrexc _soya.pyx --> _soya.c
File "./setup.py", line 318, in <module>
**KARGS)
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 340,
in run
self.build_extensions()
File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
81, in build_extensions
ext.sources = self.pyrex_sources(ext.sources, ext)
File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
188, in pyrex_sources
result = pyrex_compile(source, options=options)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
504, in compile
return compile_single(source, options)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
453, in compile_single
return context.compile(source, options)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
326, in compile
module_name = self.extract_module_name(source)
File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
241, in extract_module_name
"'%s' is not a valid module name" % module_name)
'Soya-0.15rc1._soya' is not a valid module name
I'm using an updated Archlinux distribution, so I'm using the most
recent packages available, maybe this is a problem of using newer
versions of Soya requirements?
Ideas?
Thanks,
Fabio
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
deavid
2011-06-13 15:07:17 UTC
Permalink
By the way, remember that the parent directory MUST be named "soya".
Soya source tarballs have a root folder named "soya-x.y.z". This makes
soya not buildable with pyrex or cython. If you ever download one of
these, ethier rename the parent directory to soya, or create anew soya
folder inside and move everything inside.
(This was your issue for the tarball)
Post by Fabio Varesano
Thank you deavid! I cloned your branch and I've been to successfully
compile and run soya on my system!
Thank you,
Fabio
Post by deavid
Hi, soya has one or two bugs in the compilation system on the latest
changes of SVN.
    bug fix for cython compilation
f7f35755-3713-0410-b059-dae289c688fa
https://github.com/deavid/soyamirror
git clone git://github.com/deavid/soyamirror.git
git checkout -b deavid origin/deavid
----
My local branch has changes that should be introduced in Ubuntu and
other Linux OS in order to get Soya's running.
Hope this helps you.
Post by Fabio Varesano
Hi everyone,
I just got the most recent release of Soya3d from the svn repository,
but I'm having troubles compiling it...
Pyrex found - compilation enabled
BUILDING True
Sound support (with OpenAL) enabled...
 File "./setup.py", line 245, in <module>
   soya_pyx_mtime=os.path.getmtime('soya._soya.pyx')
 File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
   return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 'soya._soya.pyx'
Same result if running as root. Any help?
Pyrex compilation enabled!
BUILDING True
Sound support (with OpenAL) enabled...
running build
running build_py
running build_ext
pyrexc _soya.pyx --> _soya.c
 File "./setup.py", line 318, in <module>
   **KARGS)
 File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
   dist.run_commands()
 File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
   self.run_command(cmd)
 File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
   cmd_obj.run()
 File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
   self.run_command(cmd_name)
 File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
   self.distribution.run_command(command)
 File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
   cmd_obj.run()
 File "/usr/lib/python2.7/distutils/command/build_ext.py", line 340,
in run
   self.build_extensions()
 File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
81, in build_extensions
   ext.sources = self.pyrex_sources(ext.sources, ext)
 File
"/usr/lib/python2.7/site-packages/Pyrex/Distutils/build_ext.py", line
188, in pyrex_sources
   result = pyrex_compile(source, options=options)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
504, in compile
   return compile_single(source, options)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
453, in compile_single
   return context.compile(source, options)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
326, in compile
   module_name = self.extract_module_name(source)
 File "/usr/lib/python2.7/site-packages/Pyrex/Compiler/Main.py", line
241, in extract_module_name
   "'%s' is not a valid module name" % module_name)
'Soya-0.15rc1._soya' is not a valid module name
I'm using an updated Archlinux distribution, so I'm using the most
recent packages available, maybe this is a problem of using newer
versions of Soya requirements?
Ideas?
Thanks,
Fabio
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
Marmoute
2011-06-13 16:07:14 UTC
Permalink
Post by deavid
By the way, remember that the parent directory MUST be named "soya".
Maybe we should fix source tarball.
deavid
2011-06-13 16:13:53 UTC
Permalink
when i created my own libs, i created a folder inside with the name of
the module.

For example, for my project bjsonrpc, inside the bjsonrpc folder i
have the following:

LICENSE
README
bjsonrpc/__init__.py
bjsonrpc/connection.py
bjsonrpc/exceptions.py
bjsonrpc/jsonlib.py
doc/Makefile
doc/source/api/index.rst
doc/source/conf.py
doc/source/index.rst
doc/source/sphinxstatic/README
examples/example1-client.py
examples/example1-server.py
setup.py
test/README
test/test_main.py
test/testserver1.py

all the module's sources are inside bjsonrpc/bjsonrpc, so, when i
package this as bjsonrpc-0.2.1, the source's parent folder is still
bjsonrpc. Seems the most easy way to handle this.

In other packages i did something like
package-x.y.z/src/modulename/__init__.py , but i don't like very much
a "src" folder for a python library.
Post by Marmoute
Post by deavid
By the way, remember that the parent directory MUST be named "soya".
Maybe we should fix source tarball.
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
Pierre-Yves David
2011-06-13 16:23:12 UTC
Permalink
Post by deavid
when i created my own libs, i created a folder inside with the name of
the module.
Having the module at the root of the module allow to just clone the project in a directory covered by PYTHONPATH to enable it. This nullify the needs for magic command as "develop".

Fixing the tarball release won't change anything to the above and help new user that want to compile.

(Moreover, disabling pyrex recompilation for release would be a good idea)
--
Pierre-Yves
Greg Ewing
2011-06-13 23:31:09 UTC
Permalink
Post by deavid
Soya source tarballs have a root folder named "soya-x.y.z". This makes
soya not buildable with pyrex or cython.
So why doesn't the source tarball come with the necessary
subdirectory in the first place?
--
Greg
deavid
2011-06-14 10:01:44 UTC
Permalink
Post by Greg Ewing
Post by deavid
Soya source tarballs have a root folder named "soya-x.y.z". This makes
soya not buildable with pyrex or cython.
So why doesn't the source tarball come with the necessary
subdirectory in the first place?
Is not a bug when building the tarball, in fact, is the correct way to
build the tarballs.
Tarballs should have a root folder named "packagename-packageversion",
where packageversion comes in X.Y.Z format.

I believe it is incorrect to ship tarballs with soya/ as a root
folder. You must be able to untar several releases of the same project
on the same folder and each one should create a different folder for
each release.

So, i think we should assume that the root folder name isn't the
module name. Take a look onto the Simple Example for distutils "sdist"
command:
http://docs.python.org/distutils/introduction.html#a-simple-example

It says: <<<sdist will create an archive file (e.g., tarball on Unix,
ZIP file on Windows) containing your setup script setup.py, and your
module foo.py. The archive file will be named foo-1.0.tar.gz (or
.zip), and will unpack into a directory foo-1.0.>>>
deavid
2011-06-14 10:28:40 UTC
Permalink
Read this too:

http://as.ynchrono.us/2007/12/filesystem-structure-of-python-project_21.html
Greg Ewing
2011-06-14 11:22:17 UTC
Permalink
Post by deavid
Tarballs should have a root folder named "packagename-packageversion",
where packageversion comes in X.Y.Z format.
Yes, but I don't see why it can't have a 'soya' subdirectory
under the soya-X.Y.Z root directory.
--
Greg
deavid
2011-06-14 11:24:21 UTC
Permalink
Post by Greg Ewing
Post by deavid
Tarballs should have a root folder named "packagename-packageversion",
where packageversion comes in X.Y.Z format.
Yes, but I don't see why it can't have a 'soya' subdirectory
under the soya-X.Y.Z root directory.
--
I think it should have it. That was my point, we should move the
sources into a soya/ subfolder and leave setup.py in the root.

Loading...