flashlight / text

Text utilities, including beam search decoding, tokenizing, and more, built for use in Flashlight.
MIT License
64 stars 15 forks source link

Add namespace_packages to setup.py #22

Closed jacobkahn closed 2 years ago

jacobkahn commented 2 years ago

See title. Prevents breakage when installing multiple flashlight.lib modules from different repos.

Test Plan (required) Local test on a clean Ubuntu box with Python 3.10

git clone https://github.com/flashlight/flashlight.git
cd flashlight
wget https://gist.githubusercontent.com/jacobkahn/f345a94974838c89df6b07f77824fca5/raw/65c3ca05961a92a08fbe1e2629a9290774baf6fd/diff.out
git apply diff.out
USE_CUDA=0 USE_MKL=0 pip install -e bindings/python
python -c "import flashlight.lib.sequence" # succeeds

and

git clone https://github.com/flashlight/text && cd text
cd bindings/python
python3 setup.py install
python -c "import flashlight.lib.text" # succeeds
facebook-github-bot commented 2 years ago

@jacobkahn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.