From 5b71b7f75edbc16298623c59385ba0f55a4651d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A6riess?= Date: Mon, 13 Sep 2021 18:17:51 -0400 Subject: [PATCH] fix relative imports + restore original module name --- python/{lopqpy3 => lopq}/__init__.py | 6 +++--- python/{lopqpy3 => lopq}/eval.py | 0 python/{lopqpy3 => lopq}/lopq_model_pb2.py | 0 python/{lopqpy3 => lopq}/model.py | 0 python/{lopqpy3 => lopq}/package_metadata.json | 0 python/{lopqpy3 => lopq}/search.py | 0 python/{lopqpy3 => lopq}/utils.py | 0 python/setup.py | 10 +++++----- 8 files changed, 8 insertions(+), 8 deletions(-) rename python/{lopqpy3 => lopq}/__init__.py (83%) rename python/{lopqpy3 => lopq}/eval.py (100%) rename python/{lopqpy3 => lopq}/lopq_model_pb2.py (100%) rename python/{lopqpy3 => lopq}/model.py (100%) rename python/{lopqpy3 => lopq}/package_metadata.json (100%) rename python/{lopqpy3 => lopq}/search.py (100%) rename python/{lopqpy3 => lopq}/utils.py (100%) diff --git a/python/lopqpy3/__init__.py b/python/lopq/__init__.py similarity index 83% rename from python/lopqpy3/__init__.py rename to python/lopq/__init__.py index 33be870..225ef39 100644 --- a/python/lopqpy3/__init__.py +++ b/python/lopq/__init__.py @@ -1,8 +1,8 @@ # Copyright 2015, Yahoo Inc. # Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms. -import model -import search -import utils +from . import model +from . import search +from . import utils from .model import LOPQModel from .search import LOPQSearcher, multisequence diff --git a/python/lopqpy3/eval.py b/python/lopq/eval.py similarity index 100% rename from python/lopqpy3/eval.py rename to python/lopq/eval.py diff --git a/python/lopqpy3/lopq_model_pb2.py b/python/lopq/lopq_model_pb2.py similarity index 100% rename from python/lopqpy3/lopq_model_pb2.py rename to python/lopq/lopq_model_pb2.py diff --git a/python/lopqpy3/model.py b/python/lopq/model.py similarity index 100% rename from python/lopqpy3/model.py rename to python/lopq/model.py diff --git a/python/lopqpy3/package_metadata.json b/python/lopq/package_metadata.json similarity index 100% rename from python/lopqpy3/package_metadata.json rename to python/lopq/package_metadata.json diff --git a/python/lopqpy3/search.py b/python/lopq/search.py similarity index 100% rename from python/lopqpy3/search.py rename to python/lopq/search.py diff --git a/python/lopqpy3/utils.py b/python/lopq/utils.py similarity index 100% rename from python/lopqpy3/utils.py rename to python/lopq/utils.py diff --git a/python/setup.py b/python/setup.py index 528e4f1..9d9260a 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,15 +1,15 @@ from setuptools import setup setup( - name='lopqpy3', + name='lopq', version='1.0.0', description='yahoo lopq for product quantization', url='https://github.com/anas-899/lopq.git', - 'author': 'Clayton Mellina,Yannis Kalantidis,Huy Nguyen', - 'author_email': 'clayton@yahoo-inc.com', - 'license': 'Apache-2.0', + author='Clayton Mellina,Yannis Kalantidis,Huy Nguyen', + author_email='clayton@yahoo-inc.com', + license='Apache-2.0', packages=[ - 'lopqpy3' + 'lopq' ], install_requires=[ 'protobuf>=3.11',