Skip to content

Add extras_require to setup.py for optional dependencies#257

Merged
aaronayres35 merged 10 commits into
masterfrom
add-extras_require
Dec 11, 2020
Merged

Add extras_require to setup.py for optional dependencies#257
aaronayres35 merged 10 commits into
masterfrom
add-extras_require

Conversation

@aaronayres35
Copy link
Copy Markdown
Contributor

@aaronayres35 aaronayres35 commented Dec 10, 2020

fixes #176

This PR adds to the extras_require section in setup.py to include additional optional dependencies. It also mentions these in the readme so they are more apparent (Should I add instructions saying to run pip install apptools[h5] for examples? I thought that might be overkill, but was unsure).

Note in this PR when looking for any optional dependencies I saw io imports listed as third party imports, so I moved those to be with standard library imports

Checklist

  • Add a news fragment if this PR is news-worthy for end users. (see docs/releases/README.rst)

Comment thread setup.py
Copy link
Copy Markdown
Contributor

@kitchoi kitchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Should I add instructions saying to run pip install apptools[h5] for examples? I thought that might be overkill, but was unsure)

Not an overkill, I actually think it is good to provide straightforward installation instructions that end users can copy and paste, instead of having to parse the package links and come up with the command themselves.
e.g. https://github.com/enthought/pyface#installation

(I am guessing this wasn't done in the past because pip wasn't as feature rich then?)

Comment thread setup.py
@kitchoi
Copy link
Copy Markdown
Contributor

kitchoi commented Dec 11, 2020

And this probably deserves a news fragment :)
Looks like we need a new category for this too, maybe build?

@kitchoi
Copy link
Copy Markdown
Contributor

kitchoi commented Dec 11, 2020

Looks like we need a new category for this too, maybe build?

See #261
If the name of "build" sounds good to you, the file can be added here regardless of whether that PR or this PR is merged first. If #261 is not backported to the maintenance branch, then we will see the leftover news fragments being detected when the changelog is built again prior to the final release... but it is probably most convenient to backport the change in #261.

Comment thread README.rst Outdated
Copy link
Copy Markdown
Contributor

@kitchoi kitchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.
Shall we have a news fragment for this change? #261 is motivated by this PR, but I thought I should confirm with you first before merging it.

@aaronayres35
Copy link
Copy Markdown
Contributor Author

aaronayres35 commented Dec 11, 2020

LGTM. Thank you.
Shall we have a news fragment for this change? #261 is motivated by this PR, but I thought I should confirm with you first before merging it.

I've added one in the latest commit, I just used the build name before 261 was merged.

But yes, I like the addition of #261, thank you!

Copy link
Copy Markdown
Contributor

@kitchoi kitchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added one in the latest commit, I just used the build name before 261 was merged.

Oops. I am sorry. I failed refresh the tab 🤦

Comment thread docs/releases/upcoming/257.build.rst Outdated
@@ -0,0 +1 @@
Add extras_require to setup.py for optional dependencies No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need (#257) at the end.

@aaronayres35 aaronayres35 merged commit b6d1311 into master Dec 11, 2020
@aaronayres35 aaronayres35 deleted the add-extras_require branch December 11, 2020 15:07
@aaronayres35 aaronayres35 added the need backport to 5.0 PRs that need to be backported to maint/5.0 label Dec 11, 2020
aaronayres35 added a commit that referenced this pull request Dec 16, 2020
* add optional dependencies for specific cub packages to extras_require

* add details to README about optional dependencies

* list io imports as standard library imports

* add prefrences/configobj to extras_rrequire as well (leave configobj in install_requires too)

* add specific install instructions

* formatting

* remove unneeded back ticks

* move install instructions into a separate section

* add news fragment

* add PR number to news fragment
aaronayres35 added a commit that referenced this pull request Dec 17, 2020
* Make sure optional dependencies are optional for tests (#260)

* make sure optional dependencies are optional for tests

* add a news fragment

* apply suggestion from code review

* Add extras_require to setup.py for optional dependencies (#257)

* add optional dependencies for specific cub packages to extras_require

* add details to README about optional dependencies

* list io imports as standard library imports

* add prefrences/configobj to extras_rrequire as well (leave configobj in install_requires too)

* add specific install instructions

* formatting

* remove unneeded back ticks

* move install instructions into a separate section

* add news fragment

* add PR number to news fragment

* Remove image license files (#262)

* remove image license files

* move internal image license file to root directory

* add image_LICENSE_CP.txt and include it in manifest

* Apply suggestions from code review

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

* Add a new category for build system related changes (#261)

* update changelog

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com>
aaronayres35 added a commit that referenced this pull request Dec 17, 2020
* Make sure optional dependencies are optional for tests (#260)

* make sure optional dependencies are optional for tests

* add a news fragment

* apply suggestion from code review

* Add extras_require to setup.py for optional dependencies (#257)

* add optional dependencies for specific cub packages to extras_require

* add details to README about optional dependencies

* list io imports as standard library imports

* add prefrences/configobj to extras_rrequire as well (leave configobj in install_requires too)

* add specific install instructions

* formatting

* remove unneeded back ticks

* move install instructions into a separate section

* add news fragment

* add PR number to news fragment

* Remove image license files (#262)

* remove image license files

* move internal image license file to root directory

* add image_LICENSE_CP.txt and include it in manifest

* Apply suggestions from code review

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>

* Add a new category for build system related changes (#261)

* update changelog

Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need backport to 5.0 PRs that need to be backported to maint/5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add extra_requires in setup.py for optional dependencies

2 participants