Skip to content

Commit

Permalink
Test building on linux by disabling some symbols that arent supported…
Browse files Browse the repository at this point in the history
… by manylinux
  • Loading branch information
EmilDohne committed Feb 27, 2024
1 parent 308d6b1 commit 503c71e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches:
- master
push:
branches:
- feat-disable-features-for-linux-wheels
release:
types:
- published
Expand Down Expand Up @@ -37,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
os: [windows-latest, macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions PhotoshopAPI/src/Util/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,17 @@ class Logger {
Logger(const Logger&) = delete;
Logger& operator=(const Logger&) = delete;

// Disable these symbols so we can build linux wheels, means we wont have a time for our logs
#if defined(__GNUC__) && (__GNUC__ < 13)
inline const std::string getTime() { return ""; };
#else
inline const std::string getTime()
{
auto const time = std::chrono::current_zone()
->to_local(std::chrono::system_clock::now());
return std::format("{:%Y-%m-%d %X}", time);
}
#endif


inline const std::string createMessage(std::string time, std::string task, const std::string& message)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@ def build_extension(self, ext: CMakeExtension) -> None:
install_requires= [
"numpy>=1.26"
],
python_requires=">=3.7",
python_requires=">=3.11",
)

0 comments on commit 503c71e

Please # to comment.