Build with non Python files (#23405)
* Add a test of the built release * Polish everything * Trigger CI
This commit is contained in:
12
setup.py
12
setup.py
@@ -38,14 +38,9 @@ To create the package for pypi.
|
||||
7. Build both the sources and the wheel. Do not change anything in setup.py between
|
||||
creating the wheel and the source distribution (obviously).
|
||||
|
||||
Clean up your build and dist folders (to avoid re-uploading oldies):
|
||||
rm -rf dist
|
||||
rm -rf build
|
||||
Run `make build-release`. This will build the release and do some sanity checks for you. If this ends with an error
|
||||
message, you need to fix things before going further.
|
||||
|
||||
For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
|
||||
(this will build a wheel for the python version you use to build it).
|
||||
|
||||
For the sources, run: "python setup.py sdist"
|
||||
You should now have a /dist directory with both .whl and .tar.gz source versions.
|
||||
|
||||
8. Check that everything looks correct by uploading the package to the pypi test server:
|
||||
@@ -61,6 +56,7 @@ To create the package for pypi.
|
||||
Check you can run the following commands:
|
||||
python -c "from transformers import pipeline; classifier = pipeline('text-classification'); print(classifier('What a nice release'))"
|
||||
python -c "from transformers import *"
|
||||
python utils/check_build.py --check_lib
|
||||
|
||||
If making a patch release, double check the bug you are patching is indeed resolved.
|
||||
|
||||
@@ -446,7 +442,7 @@ setup(
|
||||
package_dir={"": "src"},
|
||||
packages=find_packages("src"),
|
||||
include_package_data=True,
|
||||
package_data={"transformers": ["*.cu", "*.cpp", "*.cuh", "*.h", "*.pyx"]},
|
||||
package_data={"": ["**/*.cu", "**/*.cpp", "**/*.cuh", "**/*.h", "**/*.pyx"]},
|
||||
zip_safe=False,
|
||||
extras_require=extras,
|
||||
entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
|
||||
|
||||
Reference in New Issue
Block a user