-
Notifications
You must be signed in to change notification settings - Fork 25
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 license file, setuptools dependency #15
base: master
Are you sure you want to change the base?
Conversation
@@ -47,5 +47,7 @@ def read(*names): | |||
packages=find_packages('src'), | |||
package_dir = {'': 'src'}, | |||
test_suite='tests.suite', | |||
install_requires=['setuptools'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless i'm mistaken, pkgresources
is provided only by setuptools?
https://github.com/glenfant/stopit/blob/master/src/stopit/__init__.py#L10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's OK for me but IMHO if tou have pip, you already have setuptools. That's why I didn't add it to setup.py. Unless you nee it for conda packaging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct @bollwyvl. Wasn't sure if pkg_resources
was involved hence the question. Agree that it should be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be added, in some cases setuptools depending on itself caused failures for me while using pip install -U
, also this code is already being executed by setuptools (hence from setuptools import setup
), if there's no setuptools prerequisite it will fail on import earlier (given dist dist being installed from sdist).
P.S. in some ancient envs pkg_resources
has been provided as a separate dist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% never depend on setuptools
Hi @bollwyvl , and thanks to help improving stopit. Two comments:
|
Howdy! Just suggestions, feel free to close this or do with it what you will! If you do keep GPL, definitely add it to your repo, and consider including the license in the distribution, as per the license :P Yeah, it's possible to not have pip, i guess, and then also possible not to have setuptools. I imagine a virtualenv without pip is possible, too. So kinda pseudo standard lib, and not usually used in this way, from what i've seen.. not sure which PEP would cover that... |
Yeah, as i mentioned, i've usually seen the canonical version info stored
with the source (i.e. _version.py, in __init__.py), and read into setup.py,
which obviates the need for runtime pkg_resources. while runtime inspection
of the distributions can be useful for extensibility, it might be overkill
here...
anyhow, PUG says:
https://github.com/pypa/python-packaging-user-guide/blob/0dcf950850644900af322343fc32025ad8994207/source/single_source_version.rst
It doesn't really suggest which is best, though the pkg_resources does have
a "be aware" but not a "warning".
…On Tue, Jan 2, 2018 at 1:53 PM jakirkham ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In setup.py
<#15 (comment)>:
> @@ -47,5 +47,7 @@ def read(*names):
packages=find_packages('src'),
package_dir = {'': 'src'},
test_suite='tests.suite',
+ install_requires=['setuptools'],
Correct @bollwyvl <https://github.com/bollwyvl>. Wasn't sure if
pkg_resources was involved hence the question. Agree that it should be
added.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AACxRDqwdtDT2xy7C1uWbW9bnJw1eiAXks5tGnsrgaJpZM4RNlG7>
.
|
@glenfant it would be useful if the license could be changed to MIT - GPL is rather restrictive for a small library like this. |
Created the 1.1.2 with license set to MIT, tested with Python 3.5 and Python 3.6. |
Great, we've packaged up the new MIT-licensed one: Would still love to see the LICENSE included in the distribution! |
@bollwyvl The MIT license file is in the repo. Is it usual to have it in the source / wheel distro ? |
tl; dr: no, including the license text isn't universal on pypi, or even in many conda packages. Other package management ecosystems, like debian, have it as a hard requirement. In conda-forge, we're trying to get more in line, as the idea is to make free/libre software as usable as possible, both from the technical angle, i.e. "my python works with my R works with my tensorflow" as well as "not going to freak out my boss or legal team" angle. So as we go along, when we package for conda-forge, we include the license directly, as you intend it to be honored, an usually try to make an upstream request to make the process more predictable in the future.
|
Oh, and this is a great read: |
@@ -1 +1,2 @@ | |||
include CHANGES.rst | |||
include LICENSE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to be added to setup.cfg
as license_file
in [metadata]
section for the sake of wheels.
Hello! Thanks for the work!
Background: I'm working on packaging
stopit
forconda
over onconda-forge
:conda-forge/staged-recipes#4708
If you'd like, I can add you as a maintainer there as well!
Anyhow, as part of that, here's a small PR which:
LICENSE
file (based on this template)setuptools
tosetup.py
Thanks again!