8000 Revert "fix: rescue docarray in setup" by jacobowitz · Pull Request #4219 · jina-ai/serve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Revert "fix: rescue docarray in setup" #4219

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

Merged
merged 1 commit into from
Jan 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,32 +74,11 @@ def add_ac(k, v):
pass


def rescue_docarray():
"""Upgrading from 2.x to 3.x is broken (https://github.com/jina-ai/jina/issues/4194)
This function checks if docarray is broken and if so attempts to rescue it
"""
try:
import docarray as docarray

__docarray_version__ = docarray.__version__

except AttributeError:
# Being here means docarray is not installed correctly, attempt to reinstall it
# as recommended by pip https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program
import subprocess

subprocess.check_call(
[sys.executable, '-m', 'pip', 'uninstall', '--yes', 'docarray']
)
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'docarray'])


class PostDevelopCommand(develop):
"""Post-installation for development mode."""

def run(self):
develop.run(self)
rescue_docarray()
register_ac()


Expand All @@ -108,7 +87,6 @@ class PostInstallCommand(install):

def run(self):
install.run(self)
rescue_docarray()
register_ac()


Expand Down
0