[Notes] [Git][BuildStream/buildstream][jjardon/pyproject] 4 commits: Move development reqirements to dev-requirements.txt



Title: GitLab

Javier Jardón pushed to branch jjardon/pyproject at BuildStream / buildstream

Commits:

4 changed files:

Changes:

  • MANIFEST.in
    ... ... @@ -21,3 +21,6 @@ recursive-include tests *.expected
    21 21
     
    
    22 22
     # Protocol Buffers
    
    23 23
     recursive-include buildstream/_protos *.proto
    
    24
    +
    
    25
    +# Requirements files
    
    26
    +dev-requirements.txt

  • dev-requirements.txt
    1
    +# Pin coverage to 4.2 for now, were experiencing
    
    2
    +# random crashes with 4.4.2
    
    3
    +coverage == 4.4.0
    
    4
    +pep8
    
    5
    +pytest >= 3.1.0
    
    6
    +pytest-cov >= 2.5.0
    
    7
    +pytest-datafiles
    
    8
    +pytest-env
    
    9
    +pytest-pep8
    
    10
    +pytest-pylint
    
    11
    +# Provide option to run tests in parallel, less reliable
    
    12
    +pytest-xdist

  • pyproject.toml
    1
    +[build-system]
    
    2
    +requires = ["setuptools", "wheel"]

  • setup.py
    ... ... @@ -25,10 +25,6 @@ import subprocess
    25 25
     import sys
    
    26 26
     import versioneer
    
    27 27
     
    
    28
    -if sys.version_info[0] != 3 or sys.version_info[1] < 5:
    
    29
    -    print("BuildStream requires Python >= 3.5")
    
    30
    -    sys.exit(1)
    
    31
    -
    
    32 28
     try:
    
    33 29
         from setuptools import setup, find_packages, Command
    
    34 30
         from setuptools.command.easy_install import ScriptWriter
    
    ... ... @@ -218,6 +214,15 @@ def get_cmdclass():
    218 214
         return cmdclass
    
    219 215
     
    
    220 216
     
    
    217
    +#####################################################
    
    218
    +#               Gather requirements                 #
    
    219
    +#####################################################
    
    220
    +setup_requires = set(['pytest-runner'])
    
    221
    +with open('dev-requirements.txt') as dev_reqs:
    
    222
    +    dev_requires = set([line for line in dev_reqs.read().split('\n')
    
    223
    +                        if not line.strip().startswith('#')])
    
    224
    +
    
    225
    +
    
    221 226
     #####################################################
    
    222 227
     #             Main setup() Invocation               #
    
    223 228
     #####################################################
    
    ... ... @@ -248,6 +253,7 @@ setup(name='BuildStream',
    248 253
                   os.path.join('buildstream', 'data', 'bst')
    
    249 254
               ])
    
    250 255
           ],
    
    256
    +      python_requires='>=3.5',
    
    251 257
           install_requires=[
    
    252 258
               'setuptools',
    
    253 259
               'psutil',
    
    ... ... @@ -260,17 +266,6 @@ setup(name='BuildStream',
    260 266
               'grpcio >= 1.10',
    
    261 267
           ],
    
    262 268
           entry_points=bst_install_entry_points,
    
    263
    -      setup_requires=['pytest-runner'],
    
    264
    -      tests_require=['pep8',
    
    265
    -                     # Pin coverage to 4.2 for now, we're experiencing
    
    266
    -                     # random crashes with 4.4.2
    
    267
    -                     'coverage == 4.4.0',
    
    268
    -                     'pytest-datafiles',
    
    269
    -                     'pytest-env',
    
    270
    -                     'pytest-pep8',
    
    271
    -                     'pytest-pylint',
    
    272
    -                     'pytest-cov >= 2.5.0',
    
    273
    -                     # Provide option to run tests in parallel, less reliable
    
    274
    -                     'pytest-xdist',
    
    275
    -                     'pytest >= 3.1.0'],
    
    269
    +      setup_requires=list(setup_requires),
    
    270
    +      tests_require=list(dev_requires - setup_requires),
    
    276 271
           zip_safe=False)



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]