Skip to content

Fix: Include tox.ini in sdist for downstream testing #58

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ArnavBallinCode
Copy link

Issue Description

Fixes #43: The source distribution (sdist) package on PyPI is missing the tox.ini file, which affects downstream testing capabilities.

Environment Details

  • httpbin version: 0.10.2
  • Python version: 3.10
  • OS: macOS 13.4
  • Installation method: pip install httpbin

Expected Behavior

  • tox.ini should be included in the source distribution
  • File should be present when extracting the sdist package
  • Running pip install -e .[test] should work without manual tox.ini creation

Actual Behavior

  • tox.ini is missing from the sdist package
  • Downstream users need to manually create tox.ini
  • Makes testing more difficult for package maintainers

Changes Made

  1. Added tox.ini to MANIFEST.in:
- include README.md LICENSE.ISC LICENSE.MIT AUTHORS test_httpbin.py
+ include README.md LICENSE.ISC LICENSE.MIT AUTHORS test_httpbin.py tox.ini
  1. Updated tox.ini configuration:
[tox]
envlist = py37,py38,py39,py310,py311,py312,pypy3
isolated_build = True

[testenv]
deps =
    pytest>=6.0
    pytest-cov
    coverage
extras = test
commands =
    pytest {posargs:tests} --cov=httpbin
    coverage report

[pytest]
testpaths = tests
python_files = test_*.py
addopts = -v --tb=short

Verification Steps

  1. Build the package locally:
python -m build --sdist
  1. Verify tox.ini inclusion:
tar tzf dist/httpbin-0.10.2.tar.gz | grep tox.ini
# Output: httpbin-0.10.2/tox.ini
  1. Test package installation:
pip install -e .[test]
tox -e py310  # Or your preferred Python version

Testing Evidence

$ tar tzf dist/httpbin-0.10.2.tar.gz | grep tox.ini
httpbin-0.10.2/tox.ini

$ python -m build --sdist
* Creating isolated environment...
* Building sdist...
Successfully built httpbin-0.10.2.tar.gz

Backwards Compatibility

  • No breaking changes introduced
  • Only adds missing file to distribution
  • Maintains existing functionality
  • Improves testing capabilities

Additional Notes

  • Fixes downstream testing issues
  • Makes package more maintainer-friendly
  • Follows Python packaging best practices
  • No changes to runtime behavior

Documentation Updates

No documentation updates required as this is a packaging fix.

Related Issues

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

Successfully merging this pull request may close these issues.

sdist is missing tox.ini
1 participant