diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6892dde9d68afdbc489838e53bcc57a1beb860fe..000eb1282e2c1cff7116f1125c8a74ccb9b8d64d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ stages: - static_code_analysis - tests - security - - schedule + - build black: # Check that every file has been formatted with black @@ -114,12 +114,12 @@ bandit: script: - bandit -r src/ -bandit_schedule: - # Find potential security issues in file. - # It's allowed to fail as it may detect false positives. - allow_failure: true - stage: schedule - only: - - schedules +wheel: + stage: build + script: + - python3 setup.py bdist_wheel + +sdist: + stage: build script: - - bandit -r src/ \ No newline at end of file + - python3 setup.py sdist diff --git a/dev-requirements.in b/dev-requirements.in index 7f709395ade74ae0c7554ec7d19b3c8369b79eaf..a0d19a4e8752bd7c39a1aee4898136bf5a4539dd 100644 --- a/dev-requirements.in +++ b/dev-requirements.in @@ -6,3 +6,5 @@ bandit radon pytest coverage +setuptools +wheel diff --git a/pipcompile.sh b/pipcompile.sh old mode 100755 new mode 100644 index 25d0ab2f436013992b550cdc01bbf714dc3b917e..a0f9ad11a5eaf72f417378c54f61bb1b311a7d98 --- a/pipcompile.sh +++ b/pipcompile.sh @@ -1,3 +1,2 @@ pip-compile --generate-hashes requirements.in pip-compile --generate-hashes dev-requirements.in - diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..e9edadff8f725740f7404369ea3d78934c2a3835 --- /dev/null +++ b/setup.py @@ -0,0 +1,46 @@ +"""" +SYSTEM REQUIREMENTS: +The following Centos packages are required for M2Crypto: +python3-devel openssl-devel swig gcc-c++ +""" + +# A setuptools based setup module. See: +# https://packaging.python.org/guides/distributing-packages-using-setuptools/ +# https://github.com/pypa/sampleproject + +from setuptools import setup +from os import path +from glob import glob + +here = path.abspath(path.dirname(__file__)) + +# Arguments marked as "Required" below must be included for upload to PyPI. +setup( + name="fts-client-py3", # Required + version="1", # Required + description="FTS Python3 CLI and libraries", # Optional + url="https://gitlab.cern.ch/fts/fts-rest-flask", # Optional + author="CERN -- FTS team", # Optional + author_email="fts-devel@cern.ch", # Optional + classifiers=[ # Optional + "Development Status :: 4 - Beta", + "Environment :: Console", + "License :: OSI Approved :: Apache Software License", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + ], + package_dir={"": "src"}, # Optional + packages=[ + "fts3", + "fts3.rest", + "fts3.cli", + "fts3.rest.client", + "fts3.rest.client.easy", + ], # Required + python_requires=">=3.6", + install_requires=["M2Crypto", "requests"], # Optional + scripts=glob(path.join(here, "src", "cli", "fts-*")), +)