Skip to content

Commit 258d830

Browse files
committed
Pip setup refined
1 parent 983ebdf commit 258d830

File tree

3 files changed

+32
-17
lines changed

3 files changed

+32
-17
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,8 @@ target/
5959
# VSCode
6060
.vscode/tags
6161
.vscode/*
62+
63+
# Custom Files
64+
*.old
65+
*.bck
66+
design/*.pdf

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ A Lightweight Multi-Process Execution Pool with load balancing and customizable
55
\author: (c) Artem Lutov <[email protected]>
66
\license: [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
77
\organizations: [eXascale Infolab](http://exascale.info/), [Lumais](http://www.lumais.com/), [ScienceWise](http://sciencewise.info/)
8-
\date: 2015-07 v1, 2017-06 v2
8+
\date: 2015-07 v1, 2017-06 v2, 2018-05 v3
99

1010
BibTeX:
1111
```bibtex
1212
@misc{pyexpool,
1313
author = {Artem Lutov and Philippe Cudré-Mauroux},
14-
title = {{PyExPool: A Lightweight Execution Pool with Constraint-aware Load-Balancer.}},
15-
year = {2017},
14+
title = {{PyExPool-v.3: A Lightweight Execution Pool with Constraint-aware Load-Balancer.}},
15+
year = {2018},
1616
url = {https://github.com/eXascaleInfolab/PyExPool}
1717
}
1818
```

setup.py

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
:Organizations: eXascale Infolab <http://exascale.info/>, Lumais <http://www.lumais.com/>
88
:Date: 2018-05
99
"""
10+
from glob import glob # Wildcards for files
1011
from setuptools import setup
1112

13+
views = glob('views/*')
14+
# print('>>> Views size:', str(len(views)), ', items:', views)
15+
# images = glob('images/*')
16+
1217
setup(
1318
name='pyexpool', # This is the name of your PyPI-package.
1419
# version='2.2.0', # Update the version number for new releases
@@ -32,15 +37,15 @@
3237
' and star the project if you like it! For any further assistance you can drop me'
3338
' a email or write [me on Linkedin](https://linkedin.com/in/artemvl).'
3439
'\n\n'
35-
'''BibTeX:
40+
"""BibTeX:
3641
```bibtex
3742
@misc{pyexpool,
3843
author = {Artem Lutov and Philippe Cudré-Mauroux},
39-
title = {{PyExPool: A Lightweight Execution Pool with Constraint-aware Load-Balancer.}},
40-
year = {2017},
44+
title = {{PyExPool-v.3: A Lightweight Execution Pool with Constraint-aware Load-Balancer.}},
45+
year = {2018},
4146
url = {https://github.com/eXascaleInfolab/PyExPool}
4247
}
43-
```'''
48+
```"""
4449
),
4550
long_description_content_type='text/markdown',
4651
url='https://github.com/eXascaleInfolab/PyExPool',
@@ -109,7 +114,8 @@
109114
# project page. What does your project relate to?
110115
#
111116
# Note that this is a string of words separated by whitespace, not a list.
112-
keywords='execution-pool load-balancer execution-constraints NUMA concurrent multi-process benchmarking', # Optional
117+
keywords=('execution-pool load-balancer task-queue multi-process benchmarking-framework'
118+
' execution-constraints NUMA concurrent parallel-computing cache-control monitoring-server'), # Optional
113119

114120
# You can just specify package directories manually here if your project is
115121
# simple. Or you can use find_packages().
@@ -121,6 +127,7 @@
121127
# py_modules=["my_module"],
122128
# packages=find_packages(exclude=['contrib', 'docs', 'tests']), # Required
123129
# packages=['pyexpool'],
130+
# packages=setuptools.find_packages(),
124131
# packages=['__init__'],
125132
py_modules=['mpepool', 'mpewui'],
126133

@@ -132,7 +139,7 @@
132139
# https://packaging.python.org/en/latest/requirements.html
133140
install_requires=['psutil>=5', 'bottle'
134141
# For Python2
135-
, 'future', 'enum34>=1'], # Optional
142+
, 'future;python_version<"3"', 'enum34>=1;python_version<"3.4"'], # Optional
136143

137144
# List additional groups of dependencies here (e.g. development
138145
# dependencies). Users will be able to install these using the "extras"
@@ -144,7 +151,7 @@
144151
# projects.
145152
extras_require={ # Optional
146153
#'dev': ['check-manifest'],
147-
'test': ['mock>=2'], # Only for Python 2
154+
'test': ['mock>=2;python_version<"3"'], # Only for Python 2
148155
},
149156

150157
#package_dir={'pyexpool': '.'},
@@ -157,11 +164,12 @@
157164
#
158165
# Include bottle template views and docs
159166
package_data={ # Optional
160-
# 'sample': ['package_data.dat'],
161-
# 'pyexpool': ['README.md', 'images/*'],
162-
# Note: images are relatively heavy
163-
# '': ['README.md', 'views/*', 'images/*'], # ! Include specified files from the current directory
164-
'': ['*.md', 'views/*'] # ! Include specified files from the current directory
167+
# Note: images are relatively heavy, wildcards/regexp are not supported out of the box
168+
# '': ['views/restapi.htm'], # Add README.md to the root and views list to the 'views'
169+
'': ['README.md'], # Add README.md to the root and views list to the 'views'
170+
'views': views, # Include views (bottle WebUI html templates)
171+
# 'views': ['webui.tpl'], # Include views (bottle WebUI html templates)
172+
# 'images': images, # Include images to the 'images'
165173
},
166174
# include_package_data=True, # Deprecated
167175

@@ -171,8 +179,10 @@
171179
#
172180
# In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
173181
# data_files specifies a sequence of (directory, files) pairs in the following way
174-
# data_files=[('', ['README.md']),
175-
# ('images', ["images/*.png"]),
182+
# data_files=[
183+
# # ('', ['README.md']),
184+
# # ('images', glob("images/*.png")),
185+
# ('views2', views),
176186
# ], # Optional
177187

178188
# To provide executable scripts, use entry points in preference to the

0 commit comments

Comments
 (0)