diff --git a/MANIFEST.in b/MANIFEST.in index 22f0e7b..cb1ead7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,7 @@ include LICENSE include HISTORY.md include Containerfile +include requirements.txt +include requirements-test.txt graft tests graft gmaps_scrapper diff --git a/Makefile b/Makefile index 796bd5b..d6aa78f 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,13 @@ release: ## Create a new tag for release. @git push -u origin HEAD --tags @echo "Github Actions will detect the new tag and release the new version." +.PHONY: build +build: + @echo "-=[ Building package ... ]=-" + @rm -rf dist + @rm -rf ./**/__pycache__ + @python -m build + .PHONY: docs docs: ## Build the documentation. @echo "building documentation ..." diff --git a/setup.py b/setup.py index a4835e3..b5aabd3 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,9 @@ from setuptools import find_packages, setup +dir_path = os.path.dirname(os.path.realpath(__file__)) + + def read(*paths, **kwargs): """Read the contents of a text file safely. >>> read("gmaps_scrapper", "VERSION") @@ -24,7 +27,7 @@ def read(*paths, **kwargs): def read_requirements(path): return [ line.strip() - for line in read(path).split("\n") + for line in read(os.path.join(dir_path, path)).split("\n") if not line.startswith(('"', "#", "-", "git+")) ] @@ -38,6 +41,7 @@ def read_requirements(path): long_description_content_type="text/markdown", author="asrulsibaoel", packages=find_packages(exclude=["tests", ".github"]), + package_data={"": ["requirements.txt"]}, install_requires=read_requirements("requirements.txt"), entry_points={ "console_scripts": ["gmaps_scrapper = gmaps_scrapper.__main__:main"]