Skip to content

Commit dc35262

Browse files
committed
Adds setup.py configuration for installation via pip etc
This enables including the modules in this repository to be easily included in conda environment specifications or to be installed in a virtual environment via `pip install .`, or by installing from the Git repository. In this version it enumerates as modules to be installed all .py files starting with a capital letter. Scripts etc in all-lowercase files are therefore not installed, but this could be added where useful. Also, it is probably better then to create a proper package structure.
1 parent aababf8 commit dc35262

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

setup.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from setuptools import setup, find_packages
2+
3+
# modules are all .py files starting with a capital letter
4+
import os
5+
import re
6+
7+
py_modules = [f[:-3] for f in os.listdir('.')
8+
if f.endswith('.py') and re.match(r'^[A-Z]', f)]
9+
10+
setup(
11+
name='majoros-utils',
12+
version='0.1',
13+
py_modules=py_modules,
14+
description="Majoros lab utility classes",
15+
author="Bill Majoros",
16+
author_email='"Bill Majoros" <martiandna@gmail.com>',
17+
license="GPL version 3"
18+
)

0 commit comments

Comments
 (0)