-
Notifications
You must be signed in to change notification settings - Fork 17
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
Publish this tool on PyPI #35
Comments
I know quite a bit about this and would be happy to help. Packaging tools that have exotically specified dependencies like this is tricky though, and I've never had good luck using |
@cthoyt Oh wow, well that would be great! This has been the main thing holding me back from trying to stick Saber on PyPI in the first place. The documentation of both keras-contrib and NeuralCoref both instruct you to use If there is a more streamlined distribution for either of these tools, I do not know about it. I have even opened an issue on the keras-contrib repo asking for help installing it with a |
PR is all done. It looks like it should work now! |
However, it looks like Update: I've dealt with packages whose names on pip and the thing they install are not the same. I would strongly recommend against doing that. It's a huge problem for users. That doesn't mean that the project name has to be changed nor the repository name on GitHub (in fact, I think your acronym is very cool). What I might suggest is changing the folder in the repository where all the code lives to something else like |
Okay so it looks like the PyPI FAQs mention something about claiming names from abandoned projects. A bit more digging reveals what is considered an abandoned project. I would say the saber project currently onl PyPI satisfies the second two criteria (no activity within 12 months and no homepage listed). It is just not clear how (or if?) I can make a request for the name If that doesn't work / isn't a good idea, I will try to think of a new name as you suggest. I would probably go with
Thanks! I was pretty proud of it haha |
That’s really great to hear! Definitely claim it yourself ASAP. The best way would be to make an account on PyPI, then run the |
@cthoyt Okay I ran into this issue after running
Any suggestions? I will try to figure it out in the meantime! |
Oh dear... Maybe one of |
I think you are correct, if I remove
|
Try modulating the release command in tox.ini from
And see if either of those work. Worst case scenario is you can remove them from the requirements, deploy anyway, and add more information to the documentation that they need to be installed separately. I hope it doesn't come to that, though. |
Oops, I think I misunderstood your previous comment. Right so I tried both
Thanks! Update: The release went through with
😢 |
So close... so the reason this didn’t work with bdist_wheel is that builds a binary package and it knew to get upset about the weird dependencies. I’m really surprised to see PyPI complains about this. Maybe open an issue on their github to see what they think a better solution is? We could also engage full revolution mode and go and help get the other two packages on PyPI too 😁 |
It looks like this is a conscious decision on their part (see last paragraph in this response). Basically, they don't want pip to reach out to URLs outside of PyPI when installing from PyPI.
Might come down to this. I know there are some still maintaining In the meantime, I will take a look at alternatives to |
You can run custom scripts via from setuptools.command.install import install
from subprocess import getoutput
...
class PostInstall(install):
pkgs = ' git+https://www.github.com/keras-team/keras-contrib.git'\
' https://github.com/huggingface/neuralcoref-models/releases/download/en_coref_md-3.0.0/en_coref_md-3.0.0.tar.gz'
def run(self):
install.run(self)
print(getoutput('pip install'+self.pkgs))
#https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program
#subprocess.call([sys.executable, '-m', 'pip', 'install', self.pkgs])
...
setup(
...
cmdclass={'install': PostInstall}
...
) And then, $ python3 setup.py sdist
$ pip install -vvv dist/package-version.zip Please note, the wheels does not support this. |
That's a cool solution. For the time being, it's probably okay to just remove these requirements from the pip installation and make sure that there is adequate user documentation on how to install these last two packages in the README (which goes to PyPI too) |
because a github direct link as a dependency apparently doesn't play nice with PyPI. Relevant discussions: pypa/pip#6301 BaderLab/saber#35
because a github direct link as a dependency apparently doesn't play nice with PyPI. Relevant discussions: pypa/pip#6301 BaderLab/saber#35
We need to properly package Saber, and publish it on PyPI so that it can be
pip install saber
. I don't know how to do this, so I need to do my homework first and then publish it. See here for some inspiration.Resources
The text was updated successfully, but these errors were encountered: