Skip to content

Commit

Permalink
Fix setuptools bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinshen56714 committed Jun 4, 2022
1 parent 11e9028 commit 69464ff
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# Python interface for the Enhanced Monte Carlo (EMC) package
# Enhanced Monte Carlo (EMC) Python Interface

The `pyemc` module is a thin Python layer around the [EMC](http://montecarlo.sourceforge.net/emc/Welcome.html) package that allows you to use EMC with ease.


## Installation

```bash
pip install pmd
```


## Usage

```python
import pyemc

# Equivalent to running ./emc_setup.pl your-setup-file.esh on the command line
pyemc.setup('your-setup-file.esh')

# Equivalent to running the emc executable
pyemc.build('build.emc')
```
19 changes: 3 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,19 @@
LONG_DESCRIPTION = f.read()


def get_exclude_bins():
bins = ['emc_linux64', 'emc_macos', 'emc_win32.exe']
if sys.platform == 'linux' or sys.platform == 'linux2':
bins.remove('emc_linux64')
elif sys.platform == 'darwin':
bins.remove('emc_macos')
elif sys.platform == 'win32':
bins.remove('emc_win32.exe')
return bins


def package_files(directory):
exclude_bins = get_exclude_bins()
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if filename not in exclude_bins:
paths.append(os.path.join('..', path, filename))
paths.append(os.path.join('..', path, filename))
return paths


extra_files = package_files('pyemc/emc')

setup(
name='emc-pypi',
version='0.1.1',
version='0.1.2',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
description='Python interface for the Enhanced Monte Carlo (EMC) package',
Expand All @@ -48,4 +35,4 @@ def package_files(directory):
],
packages=find_packages(),
package_data={'': extra_files},
zip_safe=True)
zip_safe=False)

0 comments on commit 69464ff

Please sign in to comment.