Skip to content

Conversation

@naveen521kk
Copy link
Member

@naveen521kk naveen521kk commented Jun 27, 2020

In this PR

  • Add configuration for Poetry.
  • Changed links in the Readme file to use Github Url instead of a relative path. ( Required for Publishing Package )

What is Poetry?

Poetry is a dependency manager as well as help us publish packages to Pypi. Refer to their website for more info https://python-poetry.org/.

But even here, pycairo creates a problem. Well, we should need to think about it. (Now it is fixed)

See https://github.com/python-poetry/poetry#installation for installation on your PC. Also, don't forget to read the documentation.

Also, according to https://www.python.org/dev/peps/pep-0518/ adding a pyproject.toml is necessary.

You could read https://github.com/python-poetry/poetry#what-about-pipenv.

One thing which should be done.

  • Wait for new Pycairo release

@naveen521kk naveen521kk changed the title Poetry change new Move to Poetry Jun 27, 2020
@naveen521kk
Copy link
Member Author

I have an idea for fixing pycairo installation. And making it ease for the users to install using pip.
The problem of installing it comes becausepip install pycairo doesn't work because they don't compile binary for Windows. The users need C compilers to install Cairo and then install pycairo. What we can do is to create a new repo under ManimCommunity just to maintain those binarys. We can use Travis to set it up. By building it in Travis and then adding it to the repo so we don't need each time to update the link from iifc. Compile a python package for non python depency from python wiki. Doing this will make installation more easy.

@PgBiel
Copy link
Member

PgBiel commented Jun 27, 2020

I'm not sure "Move to Poetry" is the right wording for this, more like "Add support for Poetry", right? Because we're of course not going to give up on pip, we'd just allow people to use poetry if they want.

@yoshiask
Copy link
Contributor

I'm not sure that we should be investing anything more into Cairo. Immediately after we finish the add-on API, we're going to be removing all dependencies on Cairo in favor of OpenGL rendering.

@naveen521kk naveen521kk marked this pull request as draft June 28, 2020 08:56
@PgBiel
Copy link
Member

PgBiel commented Jun 28, 2020

Immediately after we finish the add-on API, we're going to be removing all dependencies on Cairo in favor of OpenGL rendering.

More like in favor of none in specific (at least in the main repo), because the idea is that we become able to use different renderers, not just one.

@yoshiask
Copy link
Contributor

Immediately after we finish the add-on API, we're going to be removing all dependencies on Cairo in favor of OpenGL rendering.

More like in favor of none in specific (at least in the main repo), because the idea is that we become able to use different renderers, not just one.

Well, yeah, but we have to include at least one renderer with Manim that's pretty much guaranteed to work. I'm not saying that it should be hard-coded, but at least come with Manim CE as a preinstalled add-on.

@yoshiask
Copy link
Contributor

If we don't include one with the initial download, we are going to have many confused users.

@PgBiel
Copy link
Member

PgBiel commented Jun 29, 2020

Such an add-on would have to be on a separate repo either way though, and it can be added as a dep or as a submodule or something

@yoshiask
Copy link
Contributor

Yeah, that's a good idea. I'll open a new issue about how rendering should be changed.
My point is that we don't need to touch Cairo installation because it's going to be completely replaced shortly.

@naveen521kk
Copy link
Member Author

I'm not sure "Move to Poetry" is the right wording for this, more like "Add support for Poetry", right? Because we're of course not going to give up on pip, we'd just allow people to use poetry if they want.

The first thing to say is Poetry and pip are actually same. What it actually is that poetry is a way to publish the package to pip! Again, Poetry is for the ease for developers and it makes no change for the users. The users will as usual use

pip install manim

for installation. So, Move to Poetry is a valid statement and we are not gonna think about publishing packages after this PR. I currently named the package as manimce until we the name manim. Also, if you could please find me necessary classifiers other than the one added already which suit this package. See https://pypi.org/classifiers/.

Also, you could see https://pycairo.readthedocs.io/en/latest/integration.html?highlight=GL%20#moderngl-imagesurface-as-texture which maybe useful.

@naveen521kk naveen521kk marked this pull request as ready for review July 3, 2020 16:47
@naveen521kk
Copy link
Member Author

Why is Travis failing for this? Idk

@eulertour
Copy link
Member

Travis is failing for everything at the moment. In any case, after looking over it a while I think using poetry will probably save us a lot of effort in the long run.

@naveen521kk
Copy link
Member Author

Also, I am creating a GitHub Action to publish packages using poetry!

@safinsingh
Copy link
Contributor

@naveen521kk What's your progress on this? Tests have been fixed, so merge master into your branch and let them run.

@leotrs
Copy link
Contributor

leotrs commented Jul 13, 2020

Just leaving record here: let's work on #32 and #61 once this is closed.

@naveen521kk
Copy link
Member Author

naveen521kk commented Jul 14, 2020

Workflow for Github Action is done. Also, btw Pycairo is still a Problem! I just made pygobject/pycairo#191 but there is no response from them. Please do say me what can be done!

One thing which can be done is to create a fork ourselves and do release binaries for windows with what I made there.

@Aathish04 Aathish04 mentioned this pull request Jul 14, 2020
@Aathish04 Aathish04 added enhancement Additions and improvements in general infrastructure Anything related to our infrastructure new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) labels Jul 18, 2020
@naveen521kk
Copy link
Member Author

Ok so I will add some items in ReadMe contributing guidelines and also resolve conflicts by today.

@naveen521kk
Copy link
Member Author

Today we should merge this as I would be able to work on this later.

@naveen521kk
Copy link
Member Author

I think this PR is ready and can be merged.

@behackl
Copy link
Member

behackl commented Sep 6, 2020

I just tried following the instructions for installing manim via poetry, everything ran smoothly.

Apart from the one unresolved discussion (https://github.com/ManimCommunity/manim/pull/165/files#r481102250), I also think this can be merged.

@naveen521kk
Copy link
Member Author

One thing we should remember is to fix the pycairo thing for windows, as of this comment by maintainer they would do the whl in the next release so till then the pyproject.toml should be like this and then it can be changed.

@behackl I will change that thing.

@naveen521kk
Copy link
Member Author

This needs a review and then can be merged.

@naveen521kk naveen521kk requested a review from behackl September 7, 2020 07:14
@naveen521kk
Copy link
Member Author

Yes, can this be merged? @leotrs ?

@leotrs
Copy link
Contributor

leotrs commented Sep 8, 2020

Ok this is ready for merge (sorry for the delay!)

I'm merging this in exactly 24h from the moment this post is made. @ManimCommunity/core @ManimCommunity/contributor please make sure to read the instructions (docs/source/installation/for_dev.rst ) because the next time you pull from master after this is merged, things are going to break.

If anyone has any objections, please leave a message here saying so before the 24h period is up.

NOTE: I think 24h is enough because this PR has been open for a while. Even if someone is not able to leave a message in this 24h period (perhaps they don't have wifi access for the time being), it is fine to come back here later and raise any objections. In any case, if you do have any objections, make sure to not pull from master until your questions/objections are resolved.

@leotrs
Copy link
Contributor

leotrs commented Sep 9, 2020

Actually, @behackl and I just realized that moving to poetry will kill our RTD builds, so this PR needs to include that as well. Sorry to keep delaying this y'all.

@naveen521kk could you please look into this? readthedocs/readthedocs.org#4912

@naveen521kk
Copy link
Member Author

As already mentioned pip handles it now. I need to just edit the docs requirements files to use zip files(https://github.com/ManimCommunity/manim/archive/master.zip) instead of git because git dependency installs in editable mode(not possible without setup.py) while zip files are just installed and works. Which I will do soon.

I suspect this somehow broke for python 3.6 because Idk there is some issue with pip see this log from Google Collab. Using poetry is ok here. But normal pip install doesn't work out. I will try the same of windows soon.

@naveen521kk
Copy link
Member Author

@leotrs RTD build it successfully https://manim-naveen.readthedocs.io/en/latest/

@leotrs leotrs merged commit 88f8252 into ManimCommunity:master Sep 10, 2020
@naveen521kk naveen521kk deleted the poetry-change-new branch September 10, 2020 13:18
@naveen521kk naveen521kk mentioned this pull request Oct 1, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Additions and improvements in general infrastructure Anything related to our infrastructure new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants