Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace vendored latex_envs with its pypi package #746

Merged
merged 4 commits into from
Nov 24, 2016

Conversation

jcb91
Copy link
Member

@jcb91 jcb91 commented Sep 21, 2016

as mentioned in #731.

The conda-forge recipe will also need updating, which I think may require a conda-forge feedstock for the jupyter_latex_envs pypi package

@jcb91
Copy link
Member Author

jcb91 commented Sep 21, 2016

Hmm, also just realised that this will mess up docs generation from the readme. We could (perhaps!) get around that by using jupyter_nbextensions_configurator.get_configurable_extensions inside a tox environment. Note sure for now...

@jfbercher
Copy link
Member

@jcb91 Thanks for that.
I had not made this kind of PR myself because there is an additional small trouble: in the last versions of jupyter_latex_envs setup I automatically install and enable the extension (*); Thus it would not be fair here to have this extension automatically enabled for all users, and some auxiliary steps would have to be included in the setup.
For this reason I was just in the process of updating the version here with the recent updates and new features. I have also some other PR incoming.

(*) I was thinking to propose something similar here to remove the need for installation step 2.

@jcb91
Copy link
Member Author

jcb91 commented Sep 21, 2016

I automatically install and enable the extension

Yeah, I noticed that. However, it doesn't work (for me) when installing directly from pip with

pip install jupyter_latex_envs

I don't think it's a good idea to merge the pypi-package install step with the nbextension install step, since the variety of different ways in which people install each component is too great to get it all to work reliably for everyone all the time. As a case in point, it seems like checking sys.argv is insufficient for this purpose. Also, attempting to use the --sys-prefix flag results in

$  pip install https://github.com/jfbercher/jupyter_latex_envs/archive/master.zip --sys-prefix
Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --sys-prefix

If you really want a one-step install command, I'd suggest writing a customised setup install command in the setup.py. However, I'd not recommend a one-step install at all, since it'll be unintuitive by doing something unexpected by (at least some) users. Perhaps provide a custom setup command e.g. python setup.py install_and_enable?

@jfbercher
Copy link
Member

Yeah, the one step install procedure is perhaps not stable. it works for me in several configs but I still mentioned the two other steps in README and doc.
I believe that the three steps install is not intuitive at all for most users who may just want to "pip-install and try". Of course they should read the docs before trying to install!

It seeems that --sys-prefix supposes that you have also positioned --py, ie --py --sys-prefix, which works.
Let's go as it is and install it as a pip dependency, this is nice.

@jcb91
Copy link
Member Author

jcb91 commented Sep 21, 2016

It seeems that --sys-prefix supposes that you have also positioned --py

Wow, I had never come across pip's --py option before, and can find no reference to it! Nice spot 👍 where did you find it?!

I believe that the three steps install is not intuitive at all for most users

Oh, I absolutely agree, it's not a good solution, and not intuitive. However, its one saving grace is that although not intuitive, it is standardized by the jupyter docs, so it works for everyone without contradicting upstream documentation. I guess there isn't a good answer, really 😞

Anyway, as far as I can tell, this PR doesn't seem to activate the latex_envs one-step installer, so I think we're ok to use it as-is...

@jfbercher
Copy link
Member

@jcb91
What about this PR?
There are some (I believe interesting :-) new features available in latex_envs.

If we do not go on with this one I can still make a (Big) PR to update the extension here.

@jcb91
Copy link
Member Author

jcb91 commented Nov 16, 2016

This PR was fine for merging (assuming fixes for conflicts which have since appeared), but, it causes our conda build to break unless latex_envs also has a working conda recipe...

@jcb91
Copy link
Member Author

jcb91 commented Nov 16, 2016

I can knock together a latex_envs conda-forge recipe, if you'd like a hand - let me know if that'd be helpful.

@jfbercher
Copy link
Member

Didn't really notice that there were something to do for conda.
Yes, help for that recipe will he much useful since I do not know anything on conda[-forge] recipe!

@jcb91
Copy link
Member Author

jcb91 commented Nov 16, 2016

ok, I'll give it a go. Have rebased to fix conflicts

now available from conda-forge
so that test for config-only install doesn't expect javascript files :p
@jcb91 jcb91 merged commit f6b8d82 into ipython-contrib:master Nov 24, 2016
@jcb91
Copy link
Member Author

jcb91 commented Nov 24, 2016

Right, this should now hopefully work (fingers crossed, touch wood!).

@jfbercher if you could comment on/close any issues for which this provides solutions, that'd be super helpful 😄

@jcb91
Copy link
Member Author

jcb91 commented Nov 24, 2016

uff, just realised that this has removed latex_envs from the list of provided extensions on readthedocs, since the list is constructed from this repo's nbextensions directory. Not yet sure how best to handle that

@jfbercher
Copy link
Member

@jcb91 Thanks a lot for your help for this PR.

I have commented on some issues related to the earlier version of latex_envs, but I do not have the rights to close them.
I have also commented on some old issues for toc2. (there still remains some even older ones)

@jcb91
Copy link
Member Author

jcb91 commented Nov 25, 2016

Thanks!

I do not have the rights to close them

Oh, sorry, I'd assumed your were on the team already, given how many fixes you provide! I think it would be a good idea to have you in ipython-contrib - @juhasch @JanSchulz, thoughts?

@jankatins
Copy link
Member

If I have rights here, he, for sure, should have them, too... :-) Given my current activity level, it would probably be good to remove me, too...

@juhasch
Copy link
Member

juhasch commented Nov 25, 2016

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants