Skip to content

Commit

Permalink
Fix MANIFEST.in to include input.h and _libgambatte.pxd in source dis…
Browse files Browse the repository at this point in the history
…tribution (issue #9, PR #10)
  • Loading branch information
vxgmichel authored Jul 2, 2024
2 parents 842b34d + 5395bf4 commit f14066a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@ jobs:
name: Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected].0
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected].1

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.19.2

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl


Expand All @@ -41,9 +42,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python

- name: Install pypa/build
Expand All @@ -52,8 +53,9 @@ jobs:
- name: Build sdist
run: python -m build . --sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

upload_pypi:
Expand All @@ -63,12 +65,11 @@ jobs:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@master
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include LICENSE
include README.md

recursive-include libgambatte *.cpp *.h
recursive-include ext *.pyx *.pxd *.h
recursive-include *_ext *.pyx *.pxd *.h
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ module = [
ignore_missing_imports = true

[tool.cibuildwheel]
build = "cp*-win_amd64 cp*-manylinux_x86_64 cp*-macosx_x86_64"
build = "cp*-win_amd64 cp*-manylinux_x86_64 cp*-macosx_x86_64 cp*-macosx_arm64"
skip = "cp36*"
test-skip = "cp38-macosx_*:arm64"

[tool.cibuildwheel.windows]
test-command = "gambaterm --help"

[tool.cibuildwheel.macos]
test-requires = "pytest"
test-command = "pytest {project}/tests -v -k 'not test_gambaterm[interactive]'"
test-command = "pytest {project}/tests -v -k 'test_gambaterm[non-interactive]'"

[tool.cibuildwheel.linux]
before-all = "yum install -y libsamplerate portaudio openssh-clients"
Expand Down
24 changes: 15 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@
)
)


# The gambatte extension, including libgambatte with the Cython wrapper
gambatte_extension = Extension(
"gambaterm.libgambatte",
language="c++",
include_dirs=libgambatte_include_dirs + [numpy.get_include()],
include_dirs=[
*libgambatte_include_dirs,
"libgambatte_ext",
numpy.get_include(),
],
extra_compile_args=["-DHAVE_STDINT_H"],
sources=libgambatte_sources + ["libgambatte_ext/libgambatte.pyx"],
sources=[
*libgambatte_sources,
"libgambatte_ext/libgambatte.pyx",
],
)


Expand All @@ -49,16 +55,16 @@
packages=["gambaterm"],
ext_modules=[gambatte_extension, termblit_extension],
install_requires=[
"numpy>=1.20",
"asyncssh>=2.9",
"prompt_toolkit>=3.0.29",
"sounddevice",
"samplerate",
"numpy~=1.20",
"asyncssh~=2.9",
"prompt_toolkit~=3.0.29",
"sounddevice~=0.4",
"samplerate~=0.1.0", # See https://github.com/tuxu/python-samplerate/issues/19
"python-xlib; sys_platform == 'linux'",
"pynput; sys_platform != 'linux'",
],
extras_require={
"controller-support": ["pygame>=1.9.5"],
"controller-support": ["pygame~=1.9.5"],
},
python_requires=">=3.7",
entry_points={
Expand Down

0 comments on commit f14066a

Please sign in to comment.