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

add requirements to setup.py #105

Closed
Zsailer opened this issue Feb 11, 2019 · 4 comments
Closed

add requirements to setup.py #105

Zsailer opened this issue Feb 11, 2019 · 4 comments

Comments

@Zsailer
Copy link
Contributor

Zsailer commented Feb 11, 2019

Installing with pip doesn't grab the minimum dependencies found in the requirements.txt (i.e. nbclean is required to create the demo book, but it's not included in the setup.py dependencies).

Would y'all like a PR to add these to the install_requires arg in the setup.py?

@choldgraf
Copy link
Collaborator

for sure, that's a good idea! I think this could be handled by doing something like:

with open('requirements.txt', 'r') as ff:
  lines = ff.readlines()
  install_packages = [ii.strip() for ii in lines]

...

   install_requires = install_packages

PR is welcome :-)

@Zsailer
Copy link
Contributor Author

Zsailer commented Feb 11, 2019

Great! Opening a PR now.

I usually hesitate to read dependencies from the requirements.txt file into the setup.py because of this article.

But, I suppose this distinction is unlikely to matter in jupyter-book, and it would be easier not to maintain two lists that might get out of sync.

@choldgraf
Copy link
Collaborator

yeah, I hear what you mean - gosh python packaging is so confusing to me haha. Let's keep an eye open for whether this ends up messing something up :-)

thanks for the idea and quick turnaround @Zsailer!

@Zsailer
Copy link
Contributor Author

Zsailer commented Feb 11, 2019

gosh python packaging is so confusing to me haha.

You're not alone! 😆

As a side note, Jupyter-book is awesome. It's my python replacement for bookdown. Great work here!

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

No branches or pull requests

2 participants