diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f46a0181..1a523794 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,6 +9,19 @@ on: - bugfix/* - feature/* jobs: + sdist: + name: build sdist wheel + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + make preprocess + python -m pip install --upgrade pip + python -m pip install build setuptools wheel + python -m build --sdist + - uses: actions/upload-artifact@v3 + with: + path: ./dist/*.tar.gz bdist: name: build bdist wheels and test runs-on: ${{ matrix.os }} diff --git a/MANIFEST.in b/MANIFEST.in index b3c68460..3318a7e1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,6 @@ -include curl_cffi/_wrapper.* -include curl_cffi/ffi/* -include curl_cffi/include/curl/* +recursive-include tests/* + +include ffi/* +include include/curl/* +include scripts/build.py +include Makefile diff --git a/Makefile b/Makefile index 5ed30e75..c4d8f485 100644 --- a/Makefile +++ b/Makefile @@ -19,14 +19,13 @@ curl-impersonate-$(VERSION)/chrome/patches: $(CURL_VERSION) -o "curl-impersonate-$(VERSION).tar.gz" tar -xf curl-impersonate-$(VERSION).tar.gz -# TODO add the headers to sdist package curl_cffi/include/curl/curl.h: curl-impersonate-$(VERSION)/chrome/patches cd $(CURL_VERSION) for p in $ 1 and sys.argv[1] != 'bdist_wheel': + kwargs = {} + setup( - # this option is only valid in setup.py - cffi_modules=["curl_cffi/build.py:ffibuilder"], cmdclass={ "bdist_wheel": bdist_wheel_abi3, # type: ignore "build": my_build, # type: ignore }, + **kwargs, )