Skip to content

Commit 2b43cf0

Browse files
authored
Merge pull request #406 from bsc-wdc/setup_improve
Setup improve
2 parents 06e7b8d + 51dad88 commit 2b43cf0

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1 align="center">
2-
<img src="docs/logos/dislib-logo-full.png" alt="The Distributed
2+
<img src="https://github.com/bsc-wdc/dislib/raw/master/docs/logos/dislib-logo-full.png" alt="The Distributed
33
Computing Library" height="90px">
44
</h1>
55

@@ -39,7 +39,7 @@
3939

4040
The Distributed Computing Library (dislib) provides distributed algorithms ready to use as a library. So far, dislib is highly focused on machine learning algorithms, and it is greatly inspired by [scikit-learn](https://scikit-learn.org/). However, other types of numerical algorithms might be added in the future. The library has been implemented on top of [PyCOMPSs programming model](http://compss.bsc.es), and it is being developed by the [Workflows and Distributed Computing group](https://github.com/bsc-wdc) of the [Barcelona Supercomputing Center](https://www.bsc.es/). dislib allows easy local development through docker. Once the code is finished, it can be run directly on any distributed platform without any further changes. This includes clusters, supercomputers, clouds, and containerized platforms.
4141

42-
42+
<!-- End of long_description for setup.py -->
4343

4444
## Contents
4545

setup.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
import setuptools
2+
from pkg_resources import parse_requirements as _parse_requirements
23

34

4-
# read the contents of the README.md file to get a long_description
5-
from os import path
6-
this_directory = path.abspath(path.dirname(__file__))
7-
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
8-
readme = f.read()
9-
long_description = readme[:readme.find('## Contents')].strip()
5+
def get_long_description():
6+
"""Read the long_description from the README.md file"""
7+
with open('README.md') as f:
8+
readme = f.read()
9+
end = '<!-- End of long_description for setup.py -->'
10+
return readme[:readme.find(end)].strip()
11+
12+
13+
def parse_requirements():
14+
"""Parse the requirements.txt file"""
15+
with open('requirements.txt') as f:
16+
parsed_requirements = _parse_requirements(f)
17+
requirements = [str(ir) for ir in parsed_requirements]
18+
return requirements
19+
1020

1121
setuptools.setup(
1222
name="dislib",
1323
version=open('VERSION').read().strip(),
1424
author="Barcelona Supercomputing Center",
1525
author_email="[email protected]",
1626
description="The distributed computing library on top of PyCOMPSs",
17-
long_description=long_description,
27+
long_description=get_long_description(),
1828
long_description_content_type='text/markdown',
1929
url="http://dislib.bsc.es",
2030
project_urls={
@@ -33,10 +43,5 @@
3343
"Topic :: Software Development :: Libraries :: Python Modules",
3444
"Topic :: System :: Distributed Computing",
3545
],
36-
install_requires=[
37-
"scikit-learn",
38-
"numpy",
39-
"scipy",
40-
"cvxpy"
41-
]
46+
install_requires=parse_requirements(),
4247
)

0 commit comments

Comments
 (0)