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

➕ Add long description to setup.py to make README.md PyPI friendly. #279

Merged
merged 1 commit into from
Apr 26, 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
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions
# and limitations under the License.
import os
from importlib.util import module_from_spec, spec_from_file_location
from pathlib import Path
from typing import List

from setuptools import find_packages, setup
Expand All @@ -30,7 +30,7 @@ def load_module(name: str = "anomalib/__init__.py"):
Returns:
_type_: _description_
"""
location = os.path.join(os.path.dirname(__file__), name)
location = str(Path(__file__).parent / name)
spec = spec_from_file_location(name=name, location=location)
module = module_from_spec(spec) # type: ignore
spec.loader.exec_module(module) # type: ignore
Expand Down Expand Up @@ -88,19 +88,23 @@ def get_required_packages(requirement_files: List[str]) -> List[str]:


VERSION = get_version()
LONG_DESCRIPTION = (Path(__file__).parent / "README.md").read_text()
INSTALL_REQUIRES = get_required_packages(requirement_files=["base"])
EXTRAS_REQUIRE = {
"dev": get_required_packages(requirement_files=["dev", "docs"]),
"openvino": get_required_packages(requirement_files=["openvino"]),
"full": get_required_packages(requirement_files=["dev", "docs", "openvino"]),
}


setup(
name="anomalib",
version=get_version(),
author="Intel OpenVINO",
author_email="help@openvino.intel.com",
description="anomalib - Anomaly Detection Library",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="",
license="Copyright (c) Intel - All Rights Reserved. "
'Licensed under the Apache License, Version 2.0 (the "License")'
Expand Down