setup.py

38 views
Skip to first unread message

Nicolas M. Thiery

unread,
Oct 16, 2012, 3:40:42 AM10/16/12
to sage-...@googlegroups.com
Hi!

Having to manually update the packages list in the setup.py file
whenever one adds a new directory to the sage sources is a pain, and a
constant source of conflicts between patches. Shall we instead build
this list automatically, either at compile time or at sage's startup?
Would this by any chance be taken care of by the upcoming change to
setuptools #13190?

Cheers,
Nicolas
--
Nicolas M. Thi�ry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

R. Andrew Ohana

unread,
Oct 16, 2012, 3:59:05 AM10/16/12
to sage-...@googlegroups.com
No, 13190 would not solve the problem, and it would be very difficult to have the entire list generated automatically, since setting up the appropriate flags, source files, etc would be very difficult, if not impossible to automate.

13031 would do a lot to help the situation -- the point of the ticket is to use Cython's built in logic to deal with dependency checking and generation of c files (which is finally robust enough to handle the complexity of sage). Since the patch almost rewrites module_list.py, it probably needs rebasing again (I haven't rebased since 5.4.beta1).

On Tue, Oct 16, 2012 at 12:40 AM, Nicolas M. Thiery <Nicolas...@u-psud.fr> wrote:
        Hi!

Having to manually update the packages list in the setup.py file
whenever one adds a new directory to the sage sources is a pain, and a
constant source of conflicts between patches. Shall we instead build
this list automatically, either at compile time or at sage's startup?
Would this by any chance be taken care of by the upcoming change to
setuptools #13190?

Cheers,
                                Nicolas
--
Nicolas M. Thiéry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To post to this group, send email to sage-...@googlegroups.com.
To unsubscribe from this group, send email to sage-devel+...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.





--
Andrew

Nicolas M. Thiery

unread,
Oct 16, 2012, 4:28:59 AM10/16/12
to sage-...@googlegroups.com
Hi Andrew!

On Tue, Oct 16, 2012 at 12:59:05AM -0700, R. Andrew Ohana wrote:
> No, 13190 would not solve the problem, and it would be very difficult to have
> the entire list generated automatically, since setting up the appropriate
> flags, source files, etc would be very difficult, if not impossible to
> automate.

Thanks for your answer!

You are speaking about module_list.py, right? That certainly sounds
non trivial!

I was just thinking of the ``packages`` list in ``setup.py``. It seems
to be in one-to-one correspondence with the subdirectories in
devel/sage/sage. I actually just ran a diff between what I get with
``ls **/__init__.py``, and I get just three differences. One because
``graph_decompositions`` is listed twice in ``setup.py`` (an
accident), and the others because ``sage/libs/polybori/`` and
``sage/libs/gmp/` dont have a __init__.py file (those would be easy to
add).

So?
Nicolas

PS: Of course, autogenerating (part of) module_list would be nice as well :-)

Robert Bradshaw

unread,
Oct 16, 2012, 2:59:07 PM10/16/12
to sage-...@googlegroups.com
On Tue, Oct 16, 2012 at 12:59 AM, R. Andrew Ohana
<andrew...@gmail.com> wrote:
> No, 13190 would not solve the problem, and it would be very difficult to
> have the entire list generated automatically, since setting up the
> appropriate flags, source files, etc would be very difficult, if not
> impossible to automate.
>
> 13031 would do a lot to help the situation -- the point of the ticket is to
> use Cython's built in logic to deal with dependency checking and generation
> of c files (which is finally robust enough to handle the complexity of
> sage). Since the patch almost rewrites module_list.py, it probably needs
> rebasing again (I haven't rebased since 5.4.beta1).

This would also allow us to specify library dependencies, etc. in the
source files themselves (and track then transitively), so module_list
could be almost entirely generated. First we just need to get
something in and then we can work on automating setup.py piecemeal.

I'll rebase it if anyone is willing to review it.

As for packages, I see no reason to not auto-generate it. (Perhaps we
could have an excludes parameter if need be.)

David Roe

unread,
Oct 16, 2012, 3:03:54 PM10/16/12
to sage-...@googlegroups.com
As for packages, I see no reason to not auto-generate it. (Perhaps we
could have an excludes parameter if need be.)
 
+1
Reply all
Reply to author
Forward
0 new messages