-
Notifications
You must be signed in to change notification settings - Fork 19
Fix missing mdoc, mso, & tests folders when installing on Windows. #11
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
Conversation
pymdoccbor/mso/issuer.py
Outdated
| :rtype: Sign1Message | ||
| """ | ||
| utcnow = datetime.datetime.utcnow() | ||
| utcnow = datetime.datetime.now(datetime.UTC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| utcnow = datetime.datetime.now(datetime.UTC) | |
| utcnow = datetime.datetime.now(timezone.utc) |
pymdoccbor/settings.py
Outdated
| X509_COMMON_NAME = os.getenv('X509_COMMON_NAME', u"mysite.com") | ||
|
|
||
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.utcnow()) | ||
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.now(datetime.UTC)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.now(datetime.UTC)) | |
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.now(timezone.utc)) |
pymdoccbor/settings.py
Outdated
| X509_NOT_VALID_AFTER = os.getenv( | ||
| 'X509_NOT_VALID_AFTER', | ||
| datetime.datetime.utcnow() + datetime.timedelta( | ||
| datetime.datetime.now(datetime.UTC) + datetime.timedelta( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| datetime.datetime.now(datetime.UTC) + datetime.timedelta( | |
| datetime.datetime.now(timezone.utc) + datetime.timedelta( |
PascalDR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better if we use timezone to retrieve the UTC class.
When installing on Windows with
pip install git+https://github.com/IdentityPython/pyMDOC-CBOR.gitthe mdoc, mso, and tests folders are missing from the installation leading to mdoc failures. This PR fixes the issue by updating the sub-packages detection in the setup.py file.__init__.pyfiles to mdoc sub-package to aid detectionpytest --pyargs pymdoccbor.testspasses all tests without warnings