-
Notifications
You must be signed in to change notification settings - Fork 48
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
Adds LICENSE, NOTICE, CHANGES, tests source, and test vectors as data_files in the distribution. #76
Conversation
…_files in the distribution.
I found one negative side effect of using they will also be included in the wheel, which makes it a bit bigger than necessary, and the LICENSE and NOTICE at least is duplicated in the wheel. > python3.7 setup.py bdist_wheel
....
running install_data
creating build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data
creating build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data
copying LICENSE -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/
copying NOTICE -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/
copying CHANGES.md -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/
creating build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/__init__.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/event_aliases.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/reader_util.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_core_iontype.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_equivalence.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_package.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_reader_base.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_reader_binary.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_reader_buffer.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_reader_managed.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
copying tests/test_reader_text.py -> build/bdist.linux-x86_64/wheel/amazon.ion-0.3.1.data/data/tests
...
> unzip ../dist/*whl
Archive: ../dist/amazon.ion-0.3.1-py3-none-any.whl
inflating: amazon.ion-0.3.1-py3.7-nspkg.pth
inflating: amazon/ion/__init__.py
inflating: amazon/ion/core.py
inflating: amazon/ion/equivalence.py
inflating: amazon/ion/exceptions.py
inflating: amazon/ion/reader.py
inflating: amazon/ion/reader_binary.py
inflating: amazon/ion/reader_managed.py
inflating: amazon/ion/reader_text.py
inflating: amazon/ion/simple_types.py
inflating: amazon/ion/simpleion.py
inflating: amazon/ion/symbols.py
inflating: amazon/ion/util.py
inflating: amazon/ion/writer.py
inflating: amazon/ion/writer_binary.py
inflating: amazon/ion/writer_binary_raw.py
inflating: amazon/ion/writer_binary_raw_fields.py
inflating: amazon/ion/writer_buffer.py
inflating: amazon/ion/writer_text.py
inflating: amazon.ion-0.3.1.data/data/CHANGES.md
inflating: amazon.ion-0.3.1.data/data/LICENSE
inflating: amazon.ion-0.3.1.data/data/NOTICE
inflating: amazon.ion-0.3.1.data/data/tests/__init__.py
inflating: amazon.ion-0.3.1.data/data/tests/event_aliases.py
inflating: amazon.ion-0.3.1.data/data/tests/reader_util.py
inflating: amazon.ion-0.3.1.data/data/tests/test_core_iontype.py
inflating: amazon.ion-0.3.1.data/data/tests/test_equivalence.py
inflating: amazon.ion-0.3.1.data/data/tests/test_package.py
inflating: amazon.ion-0.3.1.data/data/tests/test_reader_base.py
inflating: amazon.ion-0.3.1.data/data/tests/test_reader_binary.py
inflating: amazon.ion-0.3.1.data/data/tests/test_reader_buffer.py
inflating: amazon.ion-0.3.1.data/data/tests/test_reader_managed.py
inflating: amazon.ion-0.3.1.data/data/tests/test_reader_text.py
inflating: amazon.ion-0.3.1.data/data/tests/test_simple_types.py
inflating: amazon.ion-0.3.1.data/data/tests/test_simpleion.py
inflating: amazon.ion-0.3.1.data/data/tests/test_symbols_catalog.py
inflating: amazon.ion-0.3.1.data/data/tests/test_symbols_table.py
inflating: amazon.ion-0.3.1.data/data/tests/test_util_enum.py
inflating: amazon.ion-0.3.1.data/data/tests/test_util_record.py
inflating: amazon.ion-0.3.1.data/data/tests/test_util_unicode.py
inflating: amazon.ion-0.3.1.data/data/tests/test_vectors.py
inflating: amazon.ion-0.3.1.data/data/tests/test_writer_base.py
inflating: amazon.ion-0.3.1.data/data/tests/test_writer_binary.py
inflating: amazon.ion-0.3.1.data/data/tests/test_writer_binary_raw.py
inflating: amazon.ion-0.3.1.data/data/tests/test_writer_binary_raw_fields.py
inflating: amazon.ion-0.3.1.data/data/tests/test_writer_buffer.py
inflating: amazon.ion-0.3.1.data/data/tests/test_writer_text.py
inflating: amazon.ion-0.3.1.data/data/tests/trampoline_util.py
inflating: amazon.ion-0.3.1.data/data/tests/writer_util.py
inflating: amazon.ion-0.3.1.dist-info/LICENSE
inflating: amazon.ion-0.3.1.dist-info/METADATA
inflating: amazon.ion-0.3.1.dist-info/NOTICE
inflating: amazon.ion-0.3.1.dist-info/WHEEL
inflating: amazon.ion-0.3.1.dist-info/namespace_packages.txt
inflating: amazon.ion-0.3.1.dist-info/top_level.txt
inflating: amazon.ion-0.3.1.dist-info/RECORD Now try sdist and wheels with this ... diff --git a/setup.py b/setup.py
index bba7ef6..fdf7075 100644
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@ setup(
],
data_files=[
- ('', ['LICENSE', 'NOTICE', 'CHANGES.md']),
+ ('../..', ['LICENSE', 'NOTICE', 'CHANGES.md']),
('tests', find_files('tests', '.py')),
('vectors', find_files('vectors'))
] I am pretty sure that isnt supposed to be allowed, and could be used for ill-intents. |
How we going with this? It would be really nice to get a new release out with the i586 fixes & test data , so I can tidy https://build.opensuse.org/package/show/home:jayvdb:moban/python-amazon.ion and submit it ;-) |
@jayvdb Sorry for the delay. I'm planning to resume work on this this week. Can you elaborate on this to help me understand the perceived risk?
|
There is no risk related to that for your proejct, as it is was a comment regarding using The only problem with this PR at the moment is that it will include None of this has any impact on rpms, which have shell scripting to fiddle with whatever you provide. As long as all of the test stuff is in the next sdist, I am a very happy camper. If you really like this approach, instead of |
Issue #, if available:
#72
Description of changes:
Results in the following output from
python setup.py sdist
:...[hundreds more test vectors]...
Note:
tests
is still not treated as a python package; its files are included as ordinary data files that may be executed by a consumer of the source distribution if they want.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.