Skip to content

Conversation

@Aathish04
Copy link
Member

List of Changes

  • Re-add setup.py file that was removed by Move to Poetry #165 in commit a281afd
  • Add setuptools to build-system requirements in pyproject.toml
  • Add a convenience script to extract the setup.py file from the tar.gz file generated by poetry build.

Motivation

Using poetry in tandem with python3.9 and MacOS Big Sur is extremely inconvenient for the time being.
This is due to the fact that, since Python3.9 is so new, poetry attempts to install all (nearly all) the dependencies by building from source, which inevitably fail on MacOS Big Sur since it is also extremely new.

An alternative, unobtrusive method would be much better, not just in this specific case, but for any other similar scenarios that may pop up in the future.

Explanation for Changes

Re-adding the setup.py file and adding setuptools to the build-system requirements allows the developer to do an editable install via pip, the "old fashioned" way (by python3 -m pip install -e .).
As such, one need not use poetry, unless they are building the project at the very end, which works regardless of whether poetry is used to install the library in the first place.

For the sake of convenience, the python script ./script/make_manim_setup.py has been added to easily extract the setup.py file and place it in the appropriate location, as well as clean up after it.

Testing Status

Tested several times on Python3.9 with MacOS Big Sur. Installs perfectly each time, provided you have the python package wheel installed.

Further Comments

I am unsure of whether this method needs to go into the documentation, since it just provides an alternate route to installation instead of poetry.

Acknowledgement

@Aathish04 Aathish04 added pr:easy review There is nothing particular (i.e, it's about a general/small thing) to know for review! enhancement Additions and improvements in general installation Everything concerning the installation process labels Nov 21, 2020
@eulertour
Copy link
Member

This looks very redundant to me. If you want to install with setup.py why not just do it after running poetry build in your own checkout?

@Aathish04
Copy link
Member Author

Aathish04 commented Nov 21, 2020

This looks very redundant to me. If you want to install with setup.py why not just do it after running poetry build in your own checkout?

@eulertour

You're right. In my case, I was able to build the package since I had poetry installed.

With the changes I made in this P.R, the would-be developer won't need poetry at all since you have a setup.py file, and the appropriate one-line change to pyproject.toml.

This is basically a way to do an editable install without poetry.

@eulertour
Copy link
Member

It doesn't seem like being unable to install poetry is a common problem, but if you really wanted to avoid it you can ask @cobordism about his setup.

This change feels a lot like overfitting manim to suit a specific computer in the same way that grant did in the old version.

@Aathish04
Copy link
Member Author

Aathish04 commented Nov 21, 2020

Alright, so after concluding NEGOTIATIONS with @eulertour on discord, I've made the changes that we agreed on by deleting both the setup.py file, as well as the make_manim_setup.py script.

The only change now made is the inclusion of setuptools in the build requirements section of pyproject.toml.

@Aathish04 Aathish04 requested a review from eulertour November 21, 2020 10:25
@eulertour eulertour merged commit d596077 into ManimCommunity:master Nov 21, 2020
@Aathish04 Aathish04 deleted the readd-setup branch November 22, 2020 02:45
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 installation Everything concerning the installation process pr:easy review There is nothing particular (i.e, it's about a general/small thing) to know for review!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants