Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Used re.MULTILINE flag in the regular expression to handle multiline strings. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 25 additions & 29 deletions software/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,30 @@

import re
import sys

from setuptools import setup, find_packages


def version():
with open('poppy_buggy/_version.py') as f:
return re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", f.read()).group(1)

extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True

setup(name='poppy-buggy',
version=version(),
packages=find_packages(),

install_requires=['pypot >= 3', 'hampy'],

include_package_data=True,
exclude_package_data={'': ['README', '.gitignore']},

zip_safe=False,

author='https://github.com/poppy-project/poppy-buggy/graphs/contributors',
author_email='[email protected]',
description=' Poppy Buggy Software Library',
url='https://github.com/CERN/poppy-buggy',
license='GNU GENERAL PUBLIC LICENSE Version 3',

**extra
)
def get_version():
with open('poppy_buggy/_version.py') as file:
return re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", file.read(), re.MULTILINE).group(1)

def get_extra_options():
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
return extra

setup(
name='poppy-buggy',
version=get_version(),
packages=find_packages(),
install_requires=['pypot >= 3', 'hampy'],
include_package_data=True,
exclude_package_data={'': ['README', '.gitignore']},
zip_safe=False,
author='https://github.com/poppy-project/poppy-buggy/graphs/contributors',
author_email='[email protected]',
description='Poppy Buggy Software Library',
url='https://github.com/CERN/poppy-buggy',
license='GNU GENERAL PUBLIC LICENSE Version 3',
**get_extra_options()
)