Skip to content

Commit

Permalink
FIX: black formating of setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Nov 9, 2018
1 parent 8d43aac commit 7cabf44
Showing 1 changed file with 56 additions and 52 deletions.
108 changes: 56 additions & 52 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,68 +7,72 @@

from setuptools import find_packages, setup

PACKAGE_NAME = 'crystals'
DESCRIPTION = 'Data structures for crystallography'
URL = 'http://crystals.readthedocs.io'
DOWNLOAD_URL = 'http://github.com/LaurentRDC/crystals'
AUTHOR = 'Laurent P. René de Cotret'
AUTHOR_EMAIL = 'laurent.renedecotret@mail.mcgill.ca'
BASE_PACKAGE = 'crystals'
PACKAGE_NAME = "crystals"
DESCRIPTION = "Data structures for crystallography"
URL = "http://crystals.readthedocs.io"
DOWNLOAD_URL = "http://github.com/LaurentRDC/crystals"
AUTHOR = "Laurent P. René de Cotret"
AUTHOR_EMAIL = "laurent.renedecotret@mail.mcgill.ca"
BASE_PACKAGE = "crystals"

CIF_FILES = chain.from_iterable([glob('crystals\\cifs\\*.cif')])
CIF_FILES = chain.from_iterable([glob("crystals\\cifs\\*.cif")])

base_path = Path(__file__).parent
with open(base_path / BASE_PACKAGE / '__init__.py') as f:
with open(base_path / BASE_PACKAGE / "__init__.py") as f:
module_content = f.read()
VERSION = re.compile(r'.*__version__ = \'(.*?)\'', re.S).match(module_content).group(1)
LICENSE = re.compile(r'.*__license__ = \'(.*?)\'', re.S).match(module_content).group(1)
VERSION = (
re.compile(r".*__version__ = \"(.*?)\"", re.S).match(module_content).group(1)
)
LICENSE = (
re.compile(r".*__license__ = \"(.*?)\"", re.S).match(module_content).group(1)
)

with open('README.rst') as f:
with open("README.rst") as f:
README = f.read()

with open('requirements.txt') as f:
REQUIREMENTS = [line for line in f.read().split('\n') if len(line.strip())]
with open("requirements.txt") as f:
REQUIREMENTS = [line for line in f.read().split("\n") if len(line.strip())]

if __name__ == '__main__':
if __name__ == "__main__":
setup(
name = PACKAGE_NAME,
description = DESCRIPTION,
long_description = README,
license = LICENSE,
url = URL,
download_url = DOWNLOAD_URL,
version = VERSION,
author = AUTHOR,
author_email = AUTHOR_EMAIL,
maintainer = AUTHOR,
maintainer_email = AUTHOR_EMAIL,
install_requires = REQUIREMENTS,
keywords = ['crystallography'],
project_urls = {
'Documentation' : 'https://crystals.readthedocs.io/',
'Source' : 'https://github.com/LaurentRDC/crystals',
name=PACKAGE_NAME,
description=DESCRIPTION,
long_description=README,
license=LICENSE,
url=URL,
download_url=DOWNLOAD_URL,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
maintainer=AUTHOR,
maintainer_email=AUTHOR_EMAIL,
install_requires=REQUIREMENTS,
keywords=["crystallography"],
project_urls={
"Documentation": "https://crystals.readthedocs.io/",
"Source": "https://github.com/LaurentRDC/crystals",
},
python_requires = '>=3.6',
packages = find_packages(PACKAGE_NAME),
data_files = [('crystals\\cifs', CIF_FILES)],
include_package_data = True,
zip_safe = False,
python_requires=">=3.6",
packages=find_packages(PACKAGE_NAME),
data_files=[("crystals\\cifs", CIF_FILES)],
include_package_data=True,
zip_safe=False,
# list of possible classifiers:
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = ['Environment :: Console',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Bio-Informatics'
]
classifiers=[
"Environment :: Console",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
)

0 comments on commit 7cabf44

Please sign in to comment.