-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Move package to a top-level "src" directory #293
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
include LICENSE.txt CHANGELOG.rst | ||
recursive-include demos *.py *.bat *.sh | ||
recursive-include tests *.py | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ def get_version(path): | |
|
||
setup( | ||
name=NAME, | ||
version=get_version(os.path.join('colorama', '__init__.py')), | ||
version=get_version(os.path.join('src', 'colorama', '__init__.py')), | ||
description='Cross-platform colored terminal text.', | ||
long_description=read_file('README.rst'), | ||
keywords='color colour terminal text ansi windows crossplatform xplatform', | ||
|
@@ -43,6 +43,7 @@ def get_version(path): | |
url='https://github.com/tartley/colorama', | ||
license='BSD', | ||
packages=[NAME], | ||
package_dir={"": "src"}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update Ignore this comment after all. See thoughts in the next comment: Could I ask you to also fix line 43 for me, to resemble the one shown in Hynek's article? ie. from:
to something like:
where 'find_packages' should be imported from setuptools. Yeesh. Look at that, we're alternatively trying to import distutils, too. We should perhaps drop that. You leave the distutils import alone, I'll go read about whether I can delete it. Sound good? Thoughts welcome. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe my suggestion is a bad idea after all. I'm terrified of breaking things for some project out there that is using distutils - if it turns out to be a high profile one, I'll get a tsunamic of issues, emails, tweets. Requires more thought. Ignore my suggestion above. |
||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', | ||
# see classifiers https://pypi.org/pypi?%3Aaction=list_classifiers | ||
classifiers=[ | ||
|
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.
Thinking out loud. Do we need to include the tests in the package? I think https://hynek.me/articles/testing-packaging/ suggests we do not.
Could the test runner just import the tests from something like PROJECTROOT/tests ? (which will contain an
__init__.py
).I might try it out myself tomorrow, but feel free to try it yourself if this makes sense to you.