#14804: transition to using install program
-------------------------------------------------+--------------------------
Reporter: felixs | Owner: tbd
Type: enhancement | Status: new
Priority: critical | Milestone: sage-5.12
Component: distribution | Resolution:
Keywords: spkg-install filelist destdir | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Felix Salfelder | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------------+--------------------------
Comment (by leif):
Replying to [comment:3 felixs]:
> Replying to [comment:2 vbraun]:
> > Python distutils at least encapsulates the file operations in
`distutils.file_utils`, so it would be a finite task to hook into that as
well.
>
> For example. but i have no idea how to "hook into that" yet without
patching distutils. is there any python magic you have in mind?
You can patch it (Python / setuptools / whatever), but you don't
necessarily have to, as most Python objects are mutable, including
functions / methods, i.e., you can overwrite them... :-)
{{{
In [1]: import distutils.file_util
In [2]: def foo(s,t): print "Hello"
...:
In [3]: distutils.file_util.copy_file=foo
In [4]: distutils.file_util.copy_file("bar","baz")
Hello
}}}
And you could e.g. do so in an spkg's `setup.py`, to use some alternate
implementation (provided elsewhere).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14804#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.