Skip to content

Commit

Permalink
➕ Add long description to setup.py to make README.md PyPI friendl…
Browse files Browse the repository at this point in the history
…y. (#279)
  • Loading branch information
samet-akcay committed Apr 26, 2022
1 parent 232c1f8 commit 1108571
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit 1108571

Please sign in to comment.