On Thu, 19 Jul 2018 at 16:01 蕭毅 <hsiaoyi0...@gmail.com> wrote: > It seems that originally I posted to wrong place. > https://groups.google.com/forum/#!topic/python-virtualenv/iExzUJhC_PY > > Hi all: > > I have a new Python package https://github.com/NAL-i5K/GFF3toolkit with > new release. > > In this new release, I have removed some binaries originally in git repo > and make them been install through internet. > > https://github.com/NAL-i5K/GFF3toolkit/blob/6cd86e007713f7ab0fbf07adc2caed88889056a9/setup.py#L22 > . > > However, when I upload the package to PyPI through > > python2 setup.py sdist > twine upload --repository-url https://test.pypi.org/legacy/ dist/* > > and install through > > pip2 install --index-url https://test.pypi.org/simple/ > > It will invoke > > python setup.py bdist_wheel > > rather than sdist. > > It looks like the customized install command will not be run. Therefore, > binaries file will not be downloaded and installed into site-packages. > How should I do to make it work ? >
It doesn't run `sdist` because all that does is make a .tar.gz of source code. the bdist_wheel command is what actually makes the wheel that pip will install. IOW it goes sdist -> wheel -> install. So if you want code to run at install it needs to happen at the bdist_wheel stage.