Move source code inside a src subdirectory.

This prevents transformers from being importable simply because the CWD
is the root of the git repository, while not being importable from other
directories. That led to inconsistent behavior, especially in examples.

Once you fetch this commit, in your dev environment, you must run:

    $ pip uninstall transformers
    $ pip install -e .
This commit is contained in:
Aymeric Augustin
2019-12-22 13:54:22 +01:00
parent ced0a94204
commit 6be7cdda66
102 changed files with 7 additions and 6 deletions

View File

@@ -56,7 +56,8 @@ setup(
keywords="NLP deep learning transformer pytorch tensorflow BERT GPT GPT-2 google openai CMU",
license="Apache",
url="https://github.com/huggingface/transformers",
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
package_dir = {'': 'src'},
packages=find_packages("src"),
install_requires=[
"numpy",
"boto3",