Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.3a2
2 changes: 0 additions & 2 deletions pyscopus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os.path
from pyscopus.scopus import Scopus
from pkg_resources import get_distribution, DistributionNotFound

__version__ = '1.0.3a2'
32 changes: 25 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
import os, codecs
import os
import codecs
from pathlib import Path

HERE = os.path.abspath(os.path.dirname(__file__))
ROOT_DIR = Path(__file__).parent


def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f:
with codecs.open(os.path.join(ROOT_DIR, *parts), "rb", "utf-8") as f:
return f.read()

import pyscopus
VERSION = pyscopus.__version__
with open(ROOT_DIR / ".version") as f:
__version__ = f.readline()

setup(
name='pyscopus',
Expand All @@ -27,14 +29,14 @@ def read(*parts):
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version=VERSION,
version=__version__,

description='A Python wrapper for Scopus API',
long_description=read("README.rst"),

# The project's main homepage.
url='http://zhiyzuo.github.io/python-scopus/',
download_url='https://github.com/zhiyzuo/python-scopus/tarball/' + VERSION,
download_url='https://github.com/zhiyzuo/python-scopus/tarball/' + __version__,

# Author details
author='Zhiya Zuo',
Expand Down Expand Up @@ -73,4 +75,20 @@ def read(*parts):
],

keywords='scopus python api document retrieval information scholar academic',

# Dependencies of pyscopus
install_requires=[
'numpy',
'pandas',
'requests',
'setuptools >= 40'
'setuptools_scm',
],

# Allowing setuptools to use Git tags for the version
use_scm_version={
'fallback_version': __version__,
'write_to': '.version',
'write_to_template': '{version}',
}
)