-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from CybercentreCanada/package
pip-installable Package
- Loading branch information
Showing
19 changed files
with
665 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
build | ||
*.egg-info | ||
*.pyc | ||
*.egg | ||
cti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +0,0 @@ | ||
[submodule "cti"] | ||
path = cti | ||
url = https://github.com/mitre/cti.git | ||
shallow = true | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cti
deleted from
a89063
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: publish | ||
|
||
trigger: | ||
branches: | ||
exclude: | ||
- '*' | ||
tags: | ||
include: ["v*"] | ||
pr: none | ||
|
||
pool: | ||
vmImage: "ubuntu-20.04" | ||
|
||
jobs: | ||
- job: build_and_deploy | ||
displayName: Build and Deploy | ||
variables: | ||
- group: deployment-information | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.9' | ||
inputs: | ||
versionSpec: '3.9' | ||
|
||
- script: | | ||
set -x | ||
python -m pip install -U build | ||
python -m build | ||
ls dist | ||
displayName: Build | ||
- script: | | ||
set -xv # Echo commands before they are run | ||
sudo env "PATH=$PATH" python -m pip install --no-cache-dir twine | ||
ls dist | ||
twine upload --skip-existing --repository-url $TEST_REPOSITORY_URL dist/* | ||
displayName: Deploy to Test PyPI | ||
env: | ||
TWINE_USERNAME: $(twineUsername) | ||
TWINE_PASSWORD: $(twinePassword) | ||
- script: | | ||
set -xv # Echo commands before they are run | ||
sudo env "PATH=$PATH" python -m pip install --no-cache-dir twine | ||
ls dist | ||
twine upload --skip-existing dist/* | ||
displayName: Deploy to PyPI | ||
env: | ||
TWINE_USERNAME: $(twineUsername) | ||
TWINE_PASSWORD: $(twinePassword) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
clint>=0.5.1 | ||
GitPython>=3.1.0 | ||
packaging>=19.0 | ||
plyara>=2.1.1 | ||
python-baseconv>=1.2.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from setuptools import setup, find_packages | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
with open('requirements.txt', 'r') as fh: | ||
requirements = fh.readlines() | ||
|
||
s = setup( | ||
name="cccs-yara", | ||
use_scm_version=True, | ||
setup_requires=["setuptools_scm"], | ||
description="A CCCS utility for YARA rule metadata validation", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
packages=find_packages(), | ||
install_requires=requirements, | ||
entry_points=""" | ||
[console_scripts] | ||
yara_validator=yara_validator.cli:main | ||
""", | ||
package_data={'yara_validator': ['*.yml']}, | ||
include_package_data=True, | ||
) |
Oops, something went wrong.