Hi Sviatoslav: Thanks for reply. Later of that time, I have got it works. Basically, what I want is to pull some pre-compiled libraries from internet during installation (in sdist) https://github.com/NAL-i5K/GFF3toolkit/blob/6aff0f4b6158219738ae6f9ae1b3029c20a30de5/setup.py#L40. However, I am not sure if I do it in correct way.
Sviatoslav Sydorenko (@webknjaz)於 2018年10月19日星期五 UTC+8上午5時44分44秒寫道: > > Hey! If you want sdist this probably means that you want to ship a source > code, which then will be compiled during installation. Is that what you > need? If you want to pre-compile it, your choice is to use a binary wheel > (bdist_wheel), in such case, however, you'll have to compile a bunch of > OS-specific wheels for each item of matrix OS x Python version. > > Just copying a dynlib file will probably not work if linked against > wrong interpreter/OS APIs. > > неділя, 5 серпня 2018 р. 06:19:15 UTC+2 користувач 蕭毅 написав: >> >> Hi Matthew: >> >> Thank you for the information, but I would like to know how to do that if >> I want to build a sdist. >> >> >> Best regards, >> Leo (Yi Hsiao) >> >> Matthew Brett <matthe...@gmail.com> 於 2018年8月4日 週六 下午6:46寫道: >> >>> Hi, >>> >>> On Sat, Aug 4, 2018 at 11:32 PM, 蕭毅 <hsiao...@gmail.com> wrote: >>> > Hi there, >>> > >>> > I have a question about how to feed some files into lib directory >>> inside the >>> > virtual environment. >>> > >>> > For example, when I create a virtual environment through >>> > >>> > python3 -m venv evn >>> > >>> > >>> > Then I will get a file directory like this: >>> > >>> > env_test >>> > ├── bin/ >>> > ├── include/ >>> > ├── lib/ >>> > ├── pip-selfcheck.json >>> > └── pyvenv.cfg >>> > >>> > and I have to put some files (*.dylib) into lib/ to make it can be >>> searched >>> > during run-time. >>> > >>> > How should I set them in setup.py or other places ? >>> >>> Did you discover the `delocate` utility? >>> >>> https://pypi.org/project/delocate/ >>> >>> If you're just shipping .dylib files that are linked to Python >>> extensions, delocate will do the copy / relink step when building >>> wheels. >>> >>> Cheers, >>> >>> Matthew >>> >> -- >> Leo (Yi Hsiao), >> Bioinformatics Internship, >> i5k workspace, National Agricultural Library, >> MD, USA >> >> Personal Website: https://hsiaoyi0504.github.io/ >> GitHub: https://github.com/hsiaoyi0504/ >> LinkedIn: https://www.linkedin.com/in/hsiaoyi0504/ >> >>