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

fdk/scripts directory not being included in wheel package #134

Open
ghost opened this issue May 12, 2022 · 0 comments
Open

fdk/scripts directory not being included in wheel package #134

ghost opened this issue May 12, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented May 12, 2022

Description:

The fn/scripts directory is not being copied into the wheel package when building the project from source distribution. It seems that such directory is being ignored because it is not a valid python package. This issue causes the mian fdk script to fail with the following error: ModuleNotFoundError: No module named 'fdk.scripts'. Such error is raised because the script has the following import statement: from fdk.scripts.fdk import main.

The issue can be easily fixed by adding an empty __init__.py file to fdk/scripts.

The setup.py corroborates my theory:

setuptools.setup(setup_requires=['pbr>=2.0.0'],
                 pbr=True,
                 packages=setuptools.find_packages(
                     exclude=["internal", "internal.*"])
                 )

Steps to reproduce the issue:

  • Download any source distribution file from releases
  • Build wheel package from root directory:
python3 setup.py bdist_wheel
or
python3 -m build 

Describe the results you received:

running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/fdk
copying fdk/__init__.py -> build/lib/fdk
copying fdk/constants.py -> build/lib/fdk
copying fdk/context.py -> build/lib/fdk
copying fdk/customer_code.py -> build/lib/fdk
copying fdk/errors.py -> build/lib/fdk
copying fdk/event_handler.py -> build/lib/fdk
copying fdk/fixtures.py -> build/lib/fdk
copying fdk/headers.py -> build/lib/fdk
copying fdk/log.py -> build/lib/fdk
copying fdk/response.py -> build/lib/fdk
copying fdk/runner.py -> build/lib/fdk
copying fdk/version.py -> build/lib/fdk
creating build/lib/fdk/async_http
copying fdk/async_http/__init__.py -> build/lib/fdk/async_http
copying fdk/async_http/app.py -> build/lib/fdk/async_http
copying fdk/async_http/error_handler.py -> build/lib/fdk/async_http
copying fdk/async_http/exceptions.py -> build/lib/fdk/async_http
copying fdk/async_http/protocol.py -> build/lib/fdk/async_http
copying fdk/async_http/request.py -> build/lib/fdk/async_http
copying fdk/async_http/response.py -> build/lib/fdk/async_http
copying fdk/async_http/router.py -> build/lib/fdk/async_http
copying fdk/async_http/server.py -> build/lib/fdk/async_http
creating build/lib/fdk/tests
copying fdk/tests/__init__.py -> build/lib/fdk/tests
copying fdk/tests/funcs.py -> build/lib/fdk/tests
copying fdk/tests/tcp_debug.py -> build/lib/fdk/tests
copying fdk/tests/test_delayed_loader.py -> build/lib/fdk/tests
copying fdk/tests/test_headers.py -> build/lib/fdk/tests
copying fdk/tests/test_http_stream.py -> build/lib/fdk/tests
copying fdk/tests/test_protocol.py -> build/lib/fdk/tests
copying fdk/tests/test_tracing.py -> build/lib/fdk/tests
running egg_info
writing fdk.egg-info/PKG-INFO
writing dependency_links to fdk.egg-info/dependency_links.txt
writing entry points to fdk.egg-info/entry_points.txt
writing requirements to fdk.egg-info/requires.txt
writing top-level names to fdk.egg-info/top_level.txt
[pbr] Reusing existing SOURCES.txt
creating build/lib/fdk/scripts
copying fdk/scripts/fdk.py -> build/lib/fdk/scripts
copying fdk/scripts/fdk_tcp_debug.py -> build/lib/fdk/scripts
/usr/local/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  setuptools.SetuptoolsDeprecationWarning,
installing to build/bdist.linux-x86_64/wheel
running install
[pbr] Generating AUTHORS
[pbr] AUTHORS complete (0.0s)
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/__init__.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/constants.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/context.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/customer_code.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/errors.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/event_handler.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/fixtures.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/headers.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/log.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/response.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/runner.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/version.py -> build/bdist.linux-x86_64/wheel/fdk
creating build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/__init__.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/app.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/error_handler.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/exceptions.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/protocol.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/request.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/response.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/router.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/server.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
creating build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/__init__.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/funcs.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/tcp_debug.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_delayed_loader.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_headers.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_http_stream.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_protocol.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_tracing.py -> build/bdist.linux-x86_64/wheel/fdk/tests
creating build/bdist.linux-x86_64/wheel/fdk/scripts
copying build/lib/fdk/scripts/fdk.py -> build/bdist.linux-x86_64/wheel/fdk/scripts
copying build/lib/fdk/scripts/fdk_tcp_debug.py -> build/bdist.linux-x86_64/wheel/fdk/scripts
running install_egg_info
Copying fdk.egg-info to build/bdist.linux-x86_64/wheel/fdk-0.1.44-py3.6.egg-info
running install_scripts
/usr/local/lib/python3.6/site-packages/pbr/packaging.py:459: EasyInstallDeprecationWarning: Use get_header
  header = easy_install.get_script_header("", executable, is_wininst)
adding license file "AUTHORS" (matched pattern "AUTHORS")
adding license file "LICENSE" (matched pattern "LICENSE")
adding license file "NOTICE.txt" (matched pattern "NOTICE.txt")
adding license file "THIRD_PARTY_LICENSES.txt" (matched pattern "THIRD_PARTY_LICENSES.txt")
creating build/bdist.linux-x86_64/wheel/fdk-0.1.44.dist-info/WHEEL
creating 'dist/fdk-0.1.44-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'fdk/__init__.py'
adding 'fdk/constants.py'
adding 'fdk/context.py'
adding 'fdk/customer_code.py'
adding 'fdk/errors.py'
adding 'fdk/event_handler.py'
adding 'fdk/fixtures.py'
adding 'fdk/headers.py'
adding 'fdk/log.py'
adding 'fdk/response.py'
adding 'fdk/runner.py'
adding 'fdk/version.py'
adding 'fdk/async_http/__init__.py'
adding 'fdk/async_http/app.py'
adding 'fdk/async_http/error_handler.py'
adding 'fdk/async_http/exceptions.py'
adding 'fdk/async_http/protocol.py'
adding 'fdk/async_http/request.py'
adding 'fdk/async_http/response.py'
adding 'fdk/async_http/router.py'
adding 'fdk/async_http/server.py'
adding 'fdk/scripts/fdk.py'
adding 'fdk/scripts/fdk_tcp_debug.py'
adding 'fdk/tests/__init__.py'
adding 'fdk/tests/funcs.py'
adding 'fdk/tests/tcp_debug.py'
adding 'fdk/tests/test_delayed_loader.py'
adding 'fdk/tests/test_headers.py'
adding 'fdk/tests/test_http_stream.py'
adding 'fdk/tests/test_protocol.py'
adding 'fdk/tests/test_tracing.py'
adding 'fdk-0.1.44.dist-info/AUTHORS'
adding 'fdk-0.1.44.dist-info/LICENSE'
adding 'fdk-0.1.44.dist-info/METADATA'
adding 'fdk-0.1.44.dist-info/NOTICE.txt'
adding 'fdk-0.1.44.dist-info/THIRD_PARTY_LICENSES.txt'
adding 'fdk-0.1.44.dist-info/WHEEL'
adding 'fdk-0.1.44.dist-info/entry_points.txt'
adding 'fdk-0.1.44.dist-info/pbr.json'
adding 'fdk-0.1.44.dist-info/top_level.txt'
adding 'fdk-0.1.44.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel

Describe the results you expected:

running bdist_wheel
running build
running build_py
copying fdk/scripts/__init__.py -> build/lib/fdk/scripts
running egg_info
writing fdk.egg-info/PKG-INFO
writing dependency_links to fdk.egg-info/dependency_links.txt
writing entry points to fdk.egg-info/entry_points.txt
writing requirements to fdk.egg-info/requires.txt
writing top-level names to fdk.egg-info/top_level.txt
[pbr] Reusing existing SOURCES.txt
/usr/local/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  setuptools.SetuptoolsDeprecationWarning,
installing to build/bdist.linux-x86_64/wheel
running install
[pbr] Generating AUTHORS
[pbr] AUTHORS complete (0.0s)
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/__init__.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/constants.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/context.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/customer_code.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/errors.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/event_handler.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/fixtures.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/headers.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/log.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/response.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/runner.py -> build/bdist.linux-x86_64/wheel/fdk
copying build/lib/fdk/version.py -> build/bdist.linux-x86_64/wheel/fdk
creating build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/__init__.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/app.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/error_handler.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/exceptions.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/protocol.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/request.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/response.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/router.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
copying build/lib/fdk/async_http/server.py -> build/bdist.linux-x86_64/wheel/fdk/async_http
creating build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/__init__.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/funcs.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/tcp_debug.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_delayed_loader.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_headers.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_http_stream.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_protocol.py -> build/bdist.linux-x86_64/wheel/fdk/tests
copying build/lib/fdk/tests/test_tracing.py -> build/bdist.linux-x86_64/wheel/fdk/tests
creating build/bdist.linux-x86_64/wheel/fdk/scripts
copying build/lib/fdk/scripts/fdk.py -> build/bdist.linux-x86_64/wheel/fdk/scripts
copying build/lib/fdk/scripts/fdk_tcp_debug.py -> build/bdist.linux-x86_64/wheel/fdk/scripts
copying build/lib/fdk/scripts/__init__.py -> build/bdist.linux-x86_64/wheel/fdk/scripts
running install_egg_info
Copying fdk.egg-info to build/bdist.linux-x86_64/wheel/fdk-0.1.44-py3.6.egg-info
running install_scripts
/usr/local/lib/python3.6/site-packages/pbr/packaging.py:459: EasyInstallDeprecationWarning: Use get_header
  header = easy_install.get_script_header("", executable, is_wininst)
adding license file "AUTHORS" (matched pattern "AUTHORS")
adding license file "LICENSE" (matched pattern "LICENSE")
adding license file "NOTICE.txt" (matched pattern "NOTICE.txt")
adding license file "THIRD_PARTY_LICENSES.txt" (matched pattern "THIRD_PARTY_LICENSES.txt")
creating build/bdist.linux-x86_64/wheel/fdk-0.1.44.dist-info/WHEEL
creating 'dist/fdk-0.1.44-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'fdk/__init__.py'
adding 'fdk/constants.py'
adding 'fdk/context.py'
adding 'fdk/customer_code.py'
adding 'fdk/errors.py'
adding 'fdk/event_handler.py'
adding 'fdk/fixtures.py'
adding 'fdk/headers.py'
adding 'fdk/log.py'
adding 'fdk/response.py'
adding 'fdk/runner.py'
adding 'fdk/version.py'
adding 'fdk/async_http/__init__.py'
adding 'fdk/async_http/app.py'
adding 'fdk/async_http/error_handler.py'
adding 'fdk/async_http/exceptions.py'
adding 'fdk/async_http/protocol.py'
adding 'fdk/async_http/request.py'
adding 'fdk/async_http/response.py'
adding 'fdk/async_http/router.py'
adding 'fdk/async_http/server.py'
adding 'fdk/scripts/__init__.py'
adding 'fdk/scripts/fdk.py'
adding 'fdk/scripts/fdk_tcp_debug.py'
adding 'fdk/tests/__init__.py'
adding 'fdk/tests/funcs.py'
adding 'fdk/tests/tcp_debug.py'
adding 'fdk/tests/test_delayed_loader.py'
adding 'fdk/tests/test_headers.py'
adding 'fdk/tests/test_http_stream.py'
adding 'fdk/tests/test_protocol.py'
adding 'fdk/tests/test_tracing.py'
adding 'fdk-0.1.44.dist-info/AUTHORS'
adding 'fdk-0.1.44.dist-info/LICENSE'
adding 'fdk-0.1.44.dist-info/METADATA'
adding 'fdk-0.1.44.dist-info/NOTICE.txt'
adding 'fdk-0.1.44.dist-info/THIRD_PARTY_LICENSES.txt'
adding 'fdk-0.1.44.dist-info/WHEEL'
adding 'fdk-0.1.44.dist-info/entry_points.txt'
adding 'fdk-0.1.44.dist-info/pbr.json'
adding 'fdk-0.1.44.dist-info/top_level.txt'
adding 'fdk-0.1.44.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel

Additional information you deem important (e.g. issue happens only occasionally):
The issue happens when building any version of source distribution files.

Additional environment details (python version, code sample, etc.):
Python 3.6.8

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

0 participants