Opened 7 years ago

Closed 7 years ago

#15510 closed enhancement (fixed)

upgrade setuptools to version 2.0.1

Reported by: ohanar Owned by:
Priority: major Milestone: sage-6.2
Component: packages: standard Keywords:
Cc: jdemeyer Merged in:
Authors: R. Andrew Ohana Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: u/jhpalmieri/setuptools Commit: 9aa741fc36872fd4fbe2ac0ff8a7ba52a81ef2c9
Dependencies: #15569 Stopgaps:

Change History (22)

comment:1 Changed 7 years ago by ohanar

  • Status changed from new to needs_review

comment:2 Changed 7 years ago by ohanar

  • Status changed from needs_review to needs_work

There is an bug in sagenb that is exposed with the new setuptools (sagenb.misc.misc.get_translations tries to list a directory that may not have been created yet).

comment:3 Changed 7 years ago by git

  • Commit changed from c9e1a3e254ec02f53874d569b21346ef76ecd07a to fc204698adb0739d0b88c9e855275a818d5fa4ab

Branch pushed to git repo; I updated commit sha1. New commits:

fc20469upgrade to setuptools 2.0.1
3a42870Merge branch 'master' into setuptools2

comment:4 Changed 7 years ago by ohanar

  • Description modified (diff)
  • Summary changed from upgrade setuptools to version 2.0 to upgrade setuptools to version 2.0.1

comment:5 Changed 7 years ago by jhpalmieri

I think that spkg-install should probably have the boilerplate code

if [ "$SAGE_LOCAL" = "" ]; then
   echo "SAGE_LOCAL undefined ... exiting";
   echo "Maybe run 'sage -sh'?"
   exit 1
fi

comment:6 Changed 7 years ago by jhpalmieri

I'm also not sure I understand your comment about sagenb: do you mean get_languages instead of get_translations? Is there an issue opened for this on the sagenb github site?

comment:8 Changed 7 years ago by ohanar

Sorry, I actually looked into this a bit more, and forgot to put a comment on this -- the issue was resolved at https://github.com/sagemath/sagenb/pull/188. We are still waiting on a new release of the sagenb to be able to merge this.

comment:9 Changed 7 years ago by jhpalmieri

So this should be "needs review", or are there other works issues? And there should be a dependency on a ticket to update sagenb.

comment:10 Changed 7 years ago by ohanar

The problem is that no new release of sagenb has been made since that pull request was merged. See https://github.com/sagemath/sagenb/pull/192.

comment:11 Changed 7 years ago by ohanar

  • Dependencies set to #15569
  • Status changed from needs_work to needs_review

Ok, should now be good to go.

comment:12 Changed 7 years ago by jhpalmieri

  • Reviewers set to John Palmieri
  • Status changed from needs_review to positive_review

Looks good to me.

comment:13 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:14 Changed 7 years ago by vbraun

I get lots of test failures (probably whenever importing somethnig)

File "src/doc/en/prep/Quickstarts/Interact.rst", line 31, in doc.en.prep.Quickstarts.Interact
Failed example:
    plot(x^2,(x,-3,3))
Expected nothing
Got:
    doctest:974: UserWarning: /home/release/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).

My home directory is (why does setuptools even create that directory?)

$ ll -d ~/.python-eggs
drwxrwxr-x. 1 release release 78 Feb  1 23:22 /home/release/.python-eggs

so it is entirely intentional that it is group writeable.

comment:15 Changed 7 years ago by jhpalmieri

I wonder when that directory is created: is it during installation of setuptools or doctesting or some time in between? I don't see anything like that in my home directory. (This is on OS X, for what that's worth.)

comment:16 Changed 7 years ago by jhpalmieri

Never mind, I see the directory now. It looks like we can change its location by setting the variable PYTHON_EGG_CACHE. It seems like we should do this in spkg-install (or in sage-env?). What should it be? "$DOT_SAGE/.python-eggs"? Something in the Sage build directory? By the way, we can also (or instead) patch the function _warn_unsafe_extraction_path in src/pkg_resources.py to silence the error.

comment:17 Changed 7 years ago by vbraun

It is the egg cache, it is created whenever a zipped egg is imported. We can just install unzipped (easy_install -Z or site-wide configuration in distutils.cfg). Just silencing the error is also fine, we already patch python to be more careful about directory permissions.

comment:18 Changed 7 years ago by vbraun

  • Cc jdemeyer added

comment:19 Changed 7 years ago by jdemeyer

  • Status changed from positive_review to needs_work

comment:20 Changed 7 years ago by jhpalmieri

  • Branch changed from u/ohanar/setuptools2 to u/jhpalmieri/setuptools2
  • Commit changed from fc204698adb0739d0b88c9e855275a818d5fa4ab to c12d70a9903ef73f4f9c6861bbc65ef450b7a38a
  • Status changed from needs_work to needs_review

Try this version.


New commits:

c12d70aupgrade to setuptools 2.0.1

comment:21 Changed 7 years ago by jhpalmieri

  • Branch changed from u/jhpalmieri/setuptools2 to u/jhpalmieri/setuptools
  • Commit changed from c12d70a9903ef73f4f9c6861bbc65ef450b7a38a to 9aa741fc36872fd4fbe2ac0ff8a7ba52a81ef2c9

This version is a little cleaner (w.r.t. merging).


New commits:

9aa741fsetuptools: export PYTHON_EGG_CACHE and silence a warning about it

comment:22 Changed 7 years ago by vbraun

  • Resolution set to fixed
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.