-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fix build command on Windows #158
Comments
I'm okay with hammering out a short term fix to get it working for you. I am open to deprecating python-fs in favor of pathlib. |
I just did a "python setup.py test", and it looks like some requirements would need to be pinned for me to test successfully. Some of these are in test code, and so pinning Django==2.2 might be acceptable to deal with this for now. I may need to do more changes than I expected. |
Is a live bucket required to run tests? Can that be easily parameterized? |
It's been a good while since I worked through these details, but I'm pretty sure Travis pulls it off with a mock. https://github.com/palewire/django-bakery/blob/master/.travis.yml#L13-L49 |
I see. The intention is to define AWS_ACCESS_KEY_ID and so on to make sure that we are not mutating any real environment, as described in moto documentation. The issue is resolved for me with small changes to the tests, I think deriving from changes in how the moto API works - it patches now on client or resource creation I think. The boto API has also changed a little and I also had to use kwargs only in a couple of places in tests. Might not have needed to do if I got the mocking right first. I am testing now only with Django 2.2, but I saw there were some issues with Django 4. I will give more recent versions of Django a try tomorrow. |
I have tested with Django 3.2 and added it to the build matrix. I am stopped from a good pull request by two things:
|
DESIRED BEHAVIOR
My team uses django-bakery in a couple of places. We want builds on Windows to just work without workarounds.
However, right now we need some workarounds because of limitations that prevent builds on Windows.
WORKAROUND
In my environment so far, two changes are needed to allow builds on Windows to proceed.
First, make sure the
BUILD_DIR
is free of a colon, which fails validation by python-fs:Second, override the build method of BuildableTemplateView to correct for the use of
os.path.join
:SHORT-TERM FIX
A short-term fix is to simply promote at least the 1-line change to build into the package. 3 lines in the local or development settings file is acceptably dry. I'll admit that our work-around for the
BUILD_DIR
is not a complete solution - you need the drive specification on Windows.I will work on a pull request for the short-term fix, but I think there will need to be discussion around the longer term fix.
LONG-TERM FIX
Using python-fs is really not that great now that Python 3 supports the pathlib module. It might be possible to migrate to the pathlib module.
The text was updated successfully, but these errors were encountered: