forked from deven96/drive_downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
import os | ||
import sys | ||
import setuptools | ||
from setuptools.command.install import install | ||
|
||
CURRENT_DIR = os.getcwd() | ||
REQUIREMENTS = 'requirements.txt' | ||
requires = [line.strip('\n') for line in open(REQUIREMENTS).readlines()] | ||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
VERSION = "0.0.1" | ||
|
||
# ensure that once a tag is created, on master, it is pushed to pypi | ||
class VerifyVersionCommand(install): | ||
"""Custom command to verify that the git tag matches our version""" | ||
description = 'verify that the git tag matches our version' | ||
|
||
def run(self): | ||
tag = os.getenv('GDD_TAG') | ||
|
||
if tag != VERSION: | ||
info = "Git tag: {0} does not match the version of this app: {1}".format( | ||
tag, VERSION | ||
) | ||
sys.exit(info) | ||
|
||
|
||
|
||
|
||
setuptools.setup( | ||
name="GdDownloader", | ||
version="0.0.1", | ||
version=VERSION, | ||
author='Domnan Diretnan, Mmadu Manasseh', | ||
author_email="[email protected]", | ||
description="easy wrapper for downloading google drive files using only shareable link", | ||
|
@@ -21,6 +40,7 @@ | |
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
license="MIT", | ||
keywords='downloader googledrive gdrive drive', | ||
classifiers=( | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
|
@@ -29,5 +49,8 @@ | |
package_data={ | ||
'': ['*.*'], | ||
}, | ||
include_package_data=True | ||
include_package_data=True, | ||
cmdclass={ | ||
'verify': VerifyVersionCommand, | ||
} | ||
) |