Skip to content

Commit

Permalink
Improve setup.py (#23)
Browse files Browse the repository at this point in the history
* Improve setup.py

* Bump
  • Loading branch information
ggravlingen authored Mar 15, 2022
1 parent f39eeb7 commit c7d045e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[![Coverage Status](https://coveralls.io/repos/github/ggravlingen/pygleif/badge.svg)](https://coveralls.io/github/ggravlingen/pygleif)
[![PyPI version](https://badge.fury.io/py/pygleif.svg)](https://badge.fury.io/py/pygleif)
[![Build Status](https://travis-ci.org/ggravlingen/pygleif.svg?branch=master)](https://travis-ci.org/ggravlingen/pygleif)

This is a Python class that queries the API of GLEIF.org to return data about a specific entity (corporation.) It can also parse the XML-files provided by GLEIF. It is also possible to search for organisation id to find LEI codes and also to get child notes for a specific LEI code.

Usage if you query the API:

```
from pygleif import GLEIF
Expand All @@ -15,6 +14,7 @@ print(data.registration.initial_registration_date)
## 1. How to use

Usage if you use the XML files:

```
from pygleif import GLEIFParseRelationshipRecord
Expand All @@ -24,4 +24,4 @@ print(data.raw.Relationship.StartNode.NodeID.text) # Uses BeautifulSoup to conv
```

There are also some examples available in the sources' example folder.
There are also some examples available in the sources' example folder.
1 change: 1 addition & 0 deletions pygleif/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.1
47 changes: 28 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
"""Set up pygleif."""

# To use a consistent encoding
from codecs import open
from os import path
from pathlib import Path

from setuptools import find_packages, setup

here = path.abspath(path.dirname(__file__))
PROJECT_DIR = Path(__file__).parent.resolve()
README_FILE = PROJECT_DIR / "README.md"
LONG_DESCRIPTION = README_FILE.read_text(encoding="utf-8")

# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
VERSION = (PROJECT_DIR / "pygleif" / "VERSION").read_text().strip()

VERSION = "3.0.0"
DOWNLOAD_URL = 'https://github.com/ggravlingen/pygleif/archive/{}.zip'.format(VERSION)
GITHUB_URL = "https://github.com/ggravlingen/pygleif"
DOWNLOAD_URL = f"{GITHUB_URL}/archive/{VERSION}.zip"

PACKAGES = find_packages(exclude=['tests', 'tests.*'])
PACKAGES = find_packages(exclude=["tests", "tests.*"])

setup(
name='pygleif',
name="pygleif",
packages=PACKAGES,
python_requires='>=3.8',
python_requires=">=3.8",
version=VERSION,
description='API for LEI',
long_description=long_description,
long_description=LONG_DESCRIPTION,
author='ggravlingen',
author_email='no@email.com',
url='https://github.com/ggravlingen/pygleif',
license='MIT',
author_email="no@email.com",
long_description_content_type="text/markdown",
url=GITHUB_URL,
include_package_data=True,
license="MIT",
keywords='lei-code lei api gleif leicode',
download_url=DOWNLOAD_URL,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Home Automation",
],
)

0 comments on commit c7d045e

Please sign in to comment.