-
-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from tomquirk/travis
init pypi deploy travis
- Loading branch information
Showing
6 changed files
with
61 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,15 +1,33 @@ | ||
import setuptools | ||
import ast | ||
import re | ||
from pathlib import Path | ||
|
||
CURRENT_DIR = Path(__file__).parent | ||
|
||
|
||
def get_long_description() -> str: | ||
readme_md = CURRENT_DIR / "README.md" | ||
with open(readme_md, encoding="utf8") as ld_file: | ||
return ld_file.read() | ||
|
||
|
||
def get_version() -> str: | ||
black_py = CURRENT_DIR / "linkedin_api/__init__.py" | ||
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)") | ||
with open(black_py, "r", encoding="utf8") as f: | ||
match = _version_re.search(f.read()) | ||
version = match.group("version") if match is not None else '"unknown"' | ||
return str(ast.literal_eval(version)) | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="linkedin_api", | ||
version="1.0.1", | ||
version=get_version(), | ||
author="Tom Quirk", | ||
author_email="[email protected]", | ||
description="Python wrapper for the Linkedin API", | ||
long_description=long_description, | ||
long_description=get_long_description(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/tomquirk/linkedin-api", | ||
license="MIT", | ||
|
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