Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make python setup.py works for development mode #832

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

megazone87
Copy link
Collaborator

namely, install by bellow cmds works:
python setup.py develop or pip install -e .

namely, install by bellow cmds works:
`python setup.py develop` or `pip install -e .`
@csukuangfj
Copy link
Collaborator

Thanks for the contribution.

setup.py is mainly used to build wheels that can be installed by normal users.

As developers, I would recommend you to read https://k2-fsa.github.io/k2/installation/for_developers.html, which does not use setup.py at all.

@megazone87
Copy link
Collaborator Author

Yeah, I read that doc. But python develop mode is a common routine for developers, e.g. it requires nothing to do after you change python sources. And if c++ sources change, just pip install -e ., instead of firstly make and others. And u don't need an env shell to source.

@danpovey
Copy link
Collaborator

I think it would be nice if setup.py were to support development mode, but I don't understand how this change accomplishes that. Is the empty string supposed to be a key for that package_dir arg? I'd like to understand what is going on.

@megazone87
Copy link
Collaborator Author

I think it would be nice if setup.py were to support development mode, but I don't understand how this change accomplishes that. Is the empty string supposed to be a key for that package_dir arg? I'd like to understand what is going on.

I think the old code should work,
according to https://docs.python.org/3/distutils/setupscript.html#listing-whole-packages

But not, I think there's a bug of setuptool pkg, and make a PR: pypa/setuptools#2803.

And we could wait for their answers, it's not critical for us anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants